Skip to content

Instantly share code, notes, and snippets.

@bjinwright
Created January 13, 2017 20:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjinwright/aa42d9609890380a77c9c886d928460a to your computer and use it in GitHub Desktop.
Save bjinwright/aa42d9609890380a77c9c886d928460a to your computer and use it in GitHub Desktop.
Create super user with management command
from django.core.management.base import BaseCommand
from django.contrib.auth import get_user_model
class Command(BaseCommand):
help = 'Echoes AWS Creds'
def handle(self, *args, **options):
get_user_model().objects.create_superuser(username='your_user', password='your_password', email='user@example.com')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment