Skip to content

Instantly share code, notes, and snippets.

Created September 7, 2018 15:12
What would you like to do?
#!/usr/bin/env bash
export PYTHONPATH=`pwd`
./ 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', '', os.environ.get('DJANGO_ADMIN_PASSWORD','*****')) if len(User.objects.filter(email='')) == 0 else print('Admin exists')" --raw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment