Ticket #17898: syncdb-multidb-createsuperuser.diff

File syncdb-multidb-createsuperuser.diff, 1021 bytes (added by Simon Charette, 13 years ago)
  • django/contrib/auth/management/__init__.py

    diff --git a/django/contrib/auth/management/__init__.py b/django/contrib/auth/management/__init__.py
    index 78a51cf..e792597 100644
    a b def create_permissions(app, created_models, verbosity, **kwargs):  
    5757            print "Adding permission '%s'" % obj
    5858
    5959
    60 def create_superuser(app, created_models, verbosity, **kwargs):
     60def create_superuser(app, created_models, verbosity, db, **kwargs):
    6161    from django.core.management import call_command
    6262
    6363    if auth_app.User in created_models and kwargs.get('interactive', True):
    def create_superuser(app, created_models, verbosity, **kwargs):  
    7070                confirm = raw_input('Please enter either "yes" or "no": ')
    7171                continue
    7272            if confirm == 'yes':
    73                 call_command("createsuperuser", interactive=True)
     73                call_command("createsuperuser", interactive=True, database=db)
    7474            break
    7575
    7676
Back to Top