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
This commit is contained in:
Adrian Holovaty 2006-09-26 15:28:07 +00:00
parent 6b4eb8bb70
commit 2170110df9
1 changed files with 1 additions and 0 deletions

View File

@ -46,6 +46,7 @@ def createsuperuser(username=None, email=None, password=None):
if not username.isalnum(): if not username.isalnum():
sys.stderr.write("Error: That username is invalid. Use only letters, digits and underscores.\n") sys.stderr.write("Error: That username is invalid. Use only letters, digits and underscores.\n")
username = None username = None
continue
try: try:
User.objects.get(username=username) User.objects.get(username=username)
except User.DoesNotExist: except User.DoesNotExist: