4👍
✅
According to django docs, you need to specify OPTIONS
dict together with built in django password validator, like this:
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
'OPTIONS': {
'min_length': 5,
},
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
0👍
ACCOUNT_PASSWORD_MIN_LENGTH is deprecated. Use Django’s own AUTH_PASSWORD_VALIDATORS setting.
- [Django]-Django foreign key model is not saving reference
- [Django]-Django – why can't I access dynamically-generated attributes in classes in my models.py from admin.py?
- [Django]-Reverse for account_login not found in Django
Source:stackexchange.com