summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorTom <tom@tomforb.es>2017-09-09 18:06:20 +0100
committerTim Graham <timograham@gmail.com>2017-11-03 20:00:08 -0400
commitb81905bfd4a745a407d246e899a7c0db1c7555be (patch)
tree1b946b7896ad5eae75dd7ef5a2ee98575aac1941 /django
parent872be5976d1009ee8b90944a2fb14b1515172825 (diff)
Fixed #28571 -- Added a prompt to bypass password validation in createsuperuser.
Diffstat (limited to 'django')
-rw-r--r--django/contrib/auth/management/commands/createsuperuser.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/django/contrib/auth/management/commands/createsuperuser.py b/django/contrib/auth/management/commands/createsuperuser.py
index 7e19ef9955..3a16c58b3d 100644
--- a/django/contrib/auth/management/commands/createsuperuser.py
+++ b/django/contrib/auth/management/commands/createsuperuser.py
@@ -163,7 +163,9 @@ class Command(BaseCommand):
validate_password(password2, self.UserModel(**fake_user_data))
except exceptions.ValidationError as err:
self.stderr.write('\n'.join(err.messages))
- password = None
+ response = input('Bypass password validation and create user anyway? [y/N]: ')
+ if response.lower() != 'y':
+ password = None
except KeyboardInterrupt:
self.stderr.write("\nOperation cancelled.")