Enforcing password strength requirements with django.contrib.auth.views.password_change

后端 未结 5 799
没有蜡笔的小新
没有蜡笔的小新 2020-12-22 23:31

We have a Django application that requires a specific level of password complexity. We currently enforce this via client-side JavaScript which can easily be defeated by some

5条回答
  •  没有蜡笔的小新
    2020-12-23 00:20

    I'd just install django-passwords and let that handle it for you: https://github.com/dstufft/django-passwords

    After that you can simply subclass the registration form and replace the field with a PasswordField.

提交回复
热议问题