Author: ubernostrum
Date: 2012-03-14 15:23:35 -0700 (Wed, 14 Mar 2012)
New Revision: 17738

Modified:
   django/trunk/django/contrib/auth/management/__init__.py
Log:
Fixed #17898: Ensure create_superuser honors the 'db' argument from 
post_sync_db. Thanks to charettes for the patch.

Modified: django/trunk/django/contrib/auth/management/__init__.py
===================================================================
--- django/trunk/django/contrib/auth/management/__init__.py     2012-03-14 
22:16:46 UTC (rev 17737)
+++ django/trunk/django/contrib/auth/management/__init__.py     2012-03-14 
22:23:35 UTC (rev 17738)
@@ -57,7 +57,7 @@
             print "Adding permission '%s'" % obj
 
 
-def create_superuser(app, created_models, verbosity, **kwargs):
+def create_superuser(app, created_models, verbosity, db, **kwargs):
     from django.core.management import call_command
 
     if auth_app.User in created_models and kwargs.get('interactive', True):
@@ -70,7 +70,7 @@
                 confirm = raw_input('Please enter either "yes" or "no": ')
                 continue
             if confirm == 'yes':
-                call_command("createsuperuser", interactive=True)
+                call_command("createsuperuser", interactive=True, database=db)
             break
 
 

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to