2021-12-12 19:14:27 +05:30
|
|
|
python3 -m venv venv && source venv/bin/activate && pip install -r requirements.txt
|
|
|
|
echo "Environment setup complete"
|
|
|
|
cd CDC_Backend
|
|
|
|
|
|
|
|
python3 manage.py flush --no-input
|
2023-10-03 01:47:26 +05:30
|
|
|
python3 manage.py makemigrations APIs
|
2021-12-12 19:14:27 +05:30
|
|
|
python3 manage.py migrate
|
|
|
|
echo "Migrations complete"
|
|
|
|
|
|
|
|
python3 manage.py collectstatic --noinput
|
2023-11-13 23:43:12 +05:30
|
|
|
python3 manage.py crontab add
|
2021-12-12 19:14:27 +05:30
|
|
|
DIR="./Storage"
|
|
|
|
if [ -d "$DIR" ]; then
|
|
|
|
### Take action if $DIR exists ###
|
|
|
|
echo "${DIR} Directory already exists"
|
|
|
|
else
|
|
|
|
### Control will jump here if $DIR does NOT exists ###
|
|
|
|
echo "Creating ${DIR} Directory..."
|
|
|
|
mkdir ${DIR}
|
|
|
|
echo "${DIR} Directory Created"
|
|
|
|
fi
|
|
|
|
|
2022-05-28 23:07:38 +05:30
|
|
|
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
|