diff --git a/.envsample b/.envsample index 008710c..08e49d0 100644 --- a/.envsample +++ b/.envsample @@ -1 +1 @@ -SECRET_KEY = YOUR_SECRET_KEY_HERE \ No newline at end of file +SECRET_KEY = VULCANWEBKEY diff --git a/README.md b/README.md index 4661e52..83401dd 100644 --- a/README.md +++ b/README.md @@ -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 +``` \ No newline at end of file diff --git a/batch/install.bat b/batch/install.bat new file mode 100644 index 0000000..3eb3d30 --- /dev/null +++ b/batch/install.bat @@ -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 diff --git a/install.exe b/install.exe new file mode 100644 index 0000000..f58b265 Binary files /dev/null and b/install.exe differ diff --git a/runserver.bat b/runserver.bat index 910dcd0..87156d8 100644 --- a/runserver.bat +++ b/runserver.bat @@ -1,3 +1,3 @@ -start npm run dev -cls +start npm run dev +cls python manage.py runserver \ No newline at end of file