Created
January 13, 2017 20:44
-
-
Save bjinwright/aa42d9609890380a77c9c886d928460a to your computer and use it in GitHub Desktop.
Create super user with management command
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
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='[email protected]') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment