From 2170110df90409a4299f833a84a1a47a9f505e16 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Tue, 26 Sep 2006 15:28:07 +0000 Subject: [PATCH] Fixed #2704 -- Fixed error in create_superuser. It was failing for invalid usernames. Thanks for reporting, jmu git-svn-id: http://code.djangoproject.com/svn/django/trunk@3864 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/auth/create_superuser.py | 1 + 1 file changed, 1 insertion(+) diff --git a/django/contrib/auth/create_superuser.py b/django/contrib/auth/create_superuser.py index f42d30539e..2e93c35b93 100644 --- a/django/contrib/auth/create_superuser.py +++ b/django/contrib/auth/create_superuser.py @@ -46,6 +46,7 @@ def createsuperuser(username=None, email=None, password=None): if not username.isalnum(): sys.stderr.write("Error: That username is invalid. Use only letters, digits and underscores.\n") username = None + continue try: User.objects.get(username=username) except User.DoesNotExist: