From be5e06129af9a3481392d1c36798c1c9f93fc872 Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Tue, 11 May 2021 13:48:26 +0200 Subject: [PATCH] Add password validation settings New on Django 1.9 --- .../project_template/project_name/settings.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/orchestra/conf/project_template/project_name/settings.py b/orchestra/conf/project_template/project_name/settings.py index fae6bbc1..576dd0b8 100644 --- a/orchestra/conf/project_template/project_name/settings.py +++ b/orchestra/conf/project_template/project_name/settings.py @@ -143,6 +143,24 @@ DATABASES = { } +# Password validation +# https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + # Internationalization # https://docs.djangoproject.com/en/{{ docs_version }}/topics/i18n/