django 1.9 createsuperuser bypass the password validation checking django 1.9 createsuperuser bypass the password validation checking django django

django 1.9 createsuperuser bypass the password validation checking


After creating the superuser with a complex password, you can set it to something easier in the shell (./manage.py shell):

from django.contrib.auth.models import Useruser = User.objects.get(username='your_user')user.set_password('simple')user.save()


You can change the AUTH_PASSWORD_VALIDATORS setting in in your dev environment. See the docs: https://docs.djangoproject.com/en/stable/topics/auth/passwords/#s-enabling-password-validation.

It is pretty straightforward: you will recognize the validators that caused your warning messages.


In fact, you do not need to modify the validator settings or first create a complex password and then later change it. Instead you can create a simple password directly bypassing all password validators.

Open the django shell

python manage.py shell

Type:

from django.contrib.auth.models import User

Hit enter and then type (e.g. to use a password consisting only of the letter 'a'):

User.objects.create_superuser('someusername', 'something@example.com', 'a')

Hit enter again and you're done.