add a simple bash script to automate the setup of the project

This commit is contained in:
Andreas Zweili 2017-12-24 23:36:31 +01:00
parent de22447f0e
commit 3ccbdb8d6d
1 changed files with 9 additions and 0 deletions

9
setup.sh Executable file
View File

@ -0,0 +1,9 @@
rm inventory/migrations/*.py
source bin/activate
pip3 install -r requirements.txt
python3 manage.py makemigrations inventory
python3 manage.py migrate
echo "from django.contrib.auth.models import User; \
User.objects.filter(email='admin@example.com').delete(); \
User.objects.create_superuser('admin', 'admin@example.com', 'password')" |
python3 manage.py shell