From b0ebcfe15af4626f5ec54336800692130adae0c3 Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Sun, 8 Jun 2008 18:18:01 +0000 Subject: [PATCH] Fixed #7394: fixed bug with syncdb and createsuperuser introduced in [7590]. Thanks, av0000@mail.ru git-svn-id: http://code.djangoproject.com/svn/django/trunk@7598 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- AUTHORS | 1 + django/contrib/auth/management/__init__.py | 2 +- django/contrib/auth/management/commands/createsuperuser.py | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index 60175e8852d..bb77b68ad54 100644 --- a/AUTHORS +++ b/AUTHORS @@ -57,6 +57,7 @@ answer newbie questions, and generally made Django that much better: David Ascher Jökull Sólberg Auðunsson Arthur + av0000@mail.ru David Avsajanishvili axiak@mit.edu Niran Babalola diff --git a/django/contrib/auth/management/__init__.py b/django/contrib/auth/management/__init__.py index 5f9908be5f9..8394bee5cda 100644 --- a/django/contrib/auth/management/__init__.py +++ b/django/contrib/auth/management/__init__.py @@ -42,7 +42,7 @@ def create_superuser(app, created_models, verbosity, **kwargs): confirm = raw_input('Please enter either "yes" or "no": ') continue if confirm == 'yes': - call_command("createsuperuser") + call_command("createsuperuser", interactive=True) break if 'create_permissions' not in [i.__name__ for i in dispatcher.getAllReceivers(signal=signals.post_syncdb)]: diff --git a/django/contrib/auth/management/commands/createsuperuser.py b/django/contrib/auth/management/commands/createsuperuser.py index ab6bd78d185..4299762c743 100644 --- a/django/contrib/auth/management/commands/createsuperuser.py +++ b/django/contrib/auth/management/commands/createsuperuser.py @@ -42,7 +42,8 @@ class Command(BaseCommand): validators.isValidEmail(email, None) except validators.ValidationError: raise CommandError("Invalid email address.") - password = '' + + password = '' # Try to determine the current system user's username to use as a default. try: