mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-07 13:34:53 +03:00
Add initial createsuperuser command
This commit is contained in:
parent
d372ec05f9
commit
c1044f0f00
|
@ -4,6 +4,9 @@ container_commands:
|
|||
leader_only: True
|
||||
02_collectstatic:
|
||||
command: "source /opt/python/run/venv/bin/activate && python manage.py collectstatic --noinput"
|
||||
03_createsuperuser:
|
||||
command: "(echo \"import os\"; echo \"from django.contrib.auth import get_user_model\"; echo \"UserModel = get_user_model()\"; echo \"if not UserModel._default_manager.filter(username='admin').exists(): UserModel._default_manager.create_superuser(**dict(username='admin',email='admin@example.com',password=os.environ['SECRET_KEY'][:8]));\") | django-admin.py shell"
|
||||
leader_only: True
|
||||
option_settings:
|
||||
"aws:elasticbeanstalk:application:environment":
|
||||
DJANGO_SETTINGS_MODULE: "config.settings.production"
|
||||
|
|
Loading…
Reference in New Issue
Block a user