密码强度
来源:5-3 用户登录-注册-注销-找回密码
陶不二呀
2020-06-06
老师你好,请问注册时候密码强度怎么改呢
写回答
1回答
-
关闭的话settings中设置
ACCOUNT_SIGNUP_PASSWORD_VERIFICATION = False # 默认是True
用自己编写的密码强度规则的话,继承DefaultAccountAdapterclass,重写clean_password方法
from allauth.account.adapter import DefaultAccountAdapterclass MyAccountAdapter(DefaultAccountAdapter):
def clean_password(self, password):
# Insert your rules here参考:https://stackoverflow.com/questions/35783759/django-allauth-and-password-strength-on-sign-up
https://stackoverflow.com/questions/31368358/how-to-disable-password-checking-in-django-allauth
032020-06-22
相似问题