From 457bb862a99f687b8dd60d01066d0294465ea85a Mon Sep 17 00:00:00 2001 From: kasv-p <84275697+kasv-p@users.noreply.github.com> Date: Sat, 28 May 2022 23:04:06 +0530 Subject: [PATCH] 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 --- setup.bat | 12 ++++++++++++ superuser.bat | 11 +++++++++++ 2 files changed, 23 insertions(+) create mode 100644 setup.bat create mode 100644 superuser.bat diff --git a/setup.bat b/setup.bat new file mode 100644 index 0000000..73da3f2 --- /dev/null +++ b/setup.bat @@ -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 diff --git a/superuser.bat b/superuser.bat new file mode 100644 index 0000000..88d3591 --- /dev/null +++ b/superuser.bat @@ -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