Merge pull request #120 from CDC-IITDH/setup-files
Add files via upload
This commit is contained in:
commit
4bfdba5dd5
|
@ -0,0 +1,15 @@
|
||||||
|
|
||||||
|
start /wait python -m venv venv && venv\Scripts\activate && pip install -r requirements.txt &^
|
||||||
|
echo Environment Setup Complete &^
|
||||||
|
timeout 3 > NUL &^
|
||||||
|
echo enter password for user postgres &^
|
||||||
|
createdb -h localhost -p 5432 -U postgres cdc &^
|
||||||
|
cd "CDC_Backend" &^
|
||||||
|
|
||||||
|
python manage.py flush --no-input &^
|
||||||
|
python manage.py makemigrations &^
|
||||||
|
python manage.py migrate &^
|
||||||
|
echo Migrations complete &^
|
||||||
|
cd .. &^
|
||||||
|
start .\superuser.bat &^
|
||||||
|
echo done successfully
|
8
setup.sh
8
setup.sh
|
@ -20,3 +20,11 @@ else
|
||||||
echo "${DIR} Directory Created"
|
echo "${DIR} Directory Created"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo Do you want ceate credentials for super user (Y/N) ?
|
||||||
|
read create
|
||||||
|
create=${create^^}
|
||||||
|
|
||||||
|
if [ "$create" == "Y" ]; then
|
||||||
|
### Take action if user want to create ###
|
||||||
|
python3 manage.py createsuperuser
|
||||||
|
fi
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
@echo off
|
||||||
|
set /p create="do you want to create supruser ? (Y/N) "
|
||||||
|
|
||||||
|
cd "CDC_Backend" &^
|
||||||
|
|
||||||
|
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
|
Loading…
Reference in New Issue