Merge pull request #25 from wulkanowy/enhancementautomatic_installation

Automatic installation
This commit is contained in:
Pengwius 2021-01-26 18:49:50 +01:00 committed by GitHub
commit 2fbc078be5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 78 additions and 39 deletions

View file

@ -1 +1 @@
SECRET_KEY = YOUR_SECRET_KEY_HERE
SECRET_KEY = VULCANWEBKEY

View file

@ -1,36 +1,45 @@
# Wulkanowy-web
🌋 Unofficial browser VULCAN UONET+ client for both students and their parents
![GitHub Workflow Status](https://github.com/wulkanowy/wulkanowy-web/workflows/Python%20application/badge.svg)
[![Discord](https://img.shields.io/discord/390889354199040011.svg?color=#33CD56)](https://discord.gg/vccAQBr)
# Development
## 1. Install dependencies.
```shell
pip install -r requirements.txt
```
And in frontend:
```shell
npm install
```
## 2. Create .env and make migrations
In the .env file put the code:
```shell
SECRET_KEY = writeanythinghere
```
After saving the files, we migrate with these commands:
```shell
python manage.py makemigrations
python manage.py migrate
```
and modify the .envsample file as you would the .env file
THE SECRET KEY MUST BE THE SAME
## 3. Start the server!
```shell
npm run dev
python manage.py runserver
```
or if you run Windows you can run:
```shell
runserver.bat
```
# Wulkanowy-web
🌋 Unofficial browser VULCAN UONET+ client for both students and their parents
![GitHub Workflow Status](https://github.com/wulkanowy/wulkanowy-web/workflows/Python%20application/badge.svg)
[![Discord](https://img.shields.io/discord/390889354199040011.svg?color=#33CD56)](https://discord.gg/vccAQBr)
# Development
## 0. Automatic installation (WINDOWS ONLY)
If you don't want to enter commands just run
```shell
install.exe
```
If that doesn't work, run the file:
```shell
install.bat
```
Which is in the batch folder
After this installation, just follow the 3rd step
## 1. Install dependencies.
```shell
pip install -r requirements.txt
```
And in frontend:
```shell
npm install
```
## 2. Create .env and make migrations
In the .env file put the code:
```shell
SECRET_KEY = VULCANWEBKEY
```
After saving the files, we migrate with these commands:
```shell
python manage.py makemigrations
python manage.py migrate
```
## 3. Start the server!
```shell
npm run dev
python manage.py runserver
```
or if you run Windows you can run:
```shell
runserver.bat
```

30
batch/install.bat Normal file
View file

@ -0,0 +1,30 @@
::To jest to samo co w pliku install.exe
pip install -r requirements.txt
echo SECRET_KEY = VULCANWEBKEY > .env
::Kiedyś to SECRET_KEY będzie generowany przez skrypt NIE RUSZAĆ!!!
::setLocal EnableDelayedExpansion
::set str=ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890
::set /a P=!random!%%36
::set znak1=!str:~%P%,1!
::set /a P=!random!%%36
::set znak2=!str:~%P%,1!
::set /a P=!random!%%36
::set znak3=!str:~%P%,1!
::set /a P=!random!%%36
::set znak4=!str:~%P%,1!
::set /a P=!random!%%36
::set znak5=!str:~%P%,1!
::set /a P=!random!%%36
::set znak6=!str:~%P%,1!
::set /a P=!random!%%36
::set znak7=!str:~%P%,1!
::set /a P=!random!%%36
::set znak8=!str:~%P%,1!
::set /a P=!random!%%36
::set znak9=!str:~%P%,1!
::set "key=%znak1%%znak2%%znak3%%znak4%%znak5%%znak6%%znak7%%znak8%%znak9%"
::echo SECRET_KEY = %key% > .env
python manage.py makemigrations
python manage.py migrate
npm install
pause

BIN
install.exe Normal file

Binary file not shown.

View file

@ -1,3 +1,3 @@
start npm run dev
cls
start npm run dev
cls
python manage.py runserver