mirror of https://github.com/django/django.git
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:
parent
6b4eb8bb70
commit
2170110df9
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue