This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
export PYTHONPATH=`pwd` | |
./manage.py collectstatic --noinput | |
echo Running ${1:-"update"} on ${2:-"local_zappa_settings.json"} | |
zappa ${1:-"update"} -s ${2:-"local_zappa_settings.json"} | |
zappa manage -s ${2:-"local_zappa_settings.json"} ${3:-"development"} migrate | |
zappa invoke -s ${2:-"local_zappa_settings.json"} ${3:-"development"} "from django.contrib.auth.models import User; import os; User.objects.create_superuser('root', 'mail@nomail.com', os.environ.get('DJANGO_ADMIN_PASSWORD','*****')) if len(User.objects.filter(email='mail@nomail.com')) == 0 else print('Admin exists')" --raw |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment