diff --git a/django/contrib/auth/create_superuser.py b/django/contrib/auth/create_superuser.py index f42d30539ed..2e93c35b93e 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: