Add files via upload

place superuser.bat file in cdc_backend folder and setup.bat in cdc folder.
updated setup.sh
please check and review
This commit is contained in:
kasv-p 2022-05-28 23:04:06 +05:30 committed by GitHub
parent 35dae1c507
commit 457bb862a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 0 deletions

12
setup.bat Normal file
View File

@ -0,0 +1,12 @@
start /wait python -m venv venv && venv\Scripts\activate && pip install -r requirements.txt &^
echo Environment Setup Complete &^
timeout 3 > NUL &^
cd "CDC_Backend" &^
python manage.py flush --no-input &^
python manage.py makemigrations &^
python manage.py migrate &^
echo Migrations complete &^
start superuser.bat &^
echo done successfully

11
superuser.bat Normal file
View File

@ -0,0 +1,11 @@
@echo off
set /p create="do you want to create supruser ? (Y/N) "
if %create% equ Y ( python manage.py createsuperuser )
if %create% equ y ( python manage.py createsuperuser )
python manage.py collectstatic --noinput
if exist Storage (echo Storage Directory already exists) else ( echo Creating Storage Directory... & mkdir Storage & echo Storage Directory Created)
timeout 3 > NUL
pause