From 0636415d54e414aa9ddff61bed92f72f9ee03a21 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Tue, 12 May 2026 11:49:45 +0200 Subject: [PATCH] Set password validators --- src/wolnelektury/settings/basic.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/wolnelektury/settings/basic.py b/src/wolnelektury/settings/basic.py index 869a78dfb..5c86787f8 100644 --- a/src/wolnelektury/settings/basic.py +++ b/src/wolnelektury/settings/basic.py @@ -15,6 +15,24 @@ CONTACT_EMAIL = 'fundacja@wolnelektury.pl' ALLOWED_HOSTS = os.environ.get('ALLOWED_HOSTS', '').split() +AUTH_PASSWORD_VALIDATORS = [ + { + "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator", + }, + { + "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator", + "OPTIONS": { + "min_length": 6, + }, + }, + { + "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator", + }, + { + "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator", + }, +] + CACHE_MIDDLEWARE_SECONDS = 3 * 60 CACHES = { -- 2.20.1