ajout de l'autologin

This commit is contained in:
Ambulance Clerc
2023-02-13 18:19:50 +01:00
parent 66713c880f
commit fc364e28e0
5 changed files with 19 additions and 3 deletions

View File

@@ -25,7 +25,7 @@ SECRET_KEY = 'django-insecure-j4jd&+4j^t_=@zr(#q@n!8e*58vkql6&_6w-t14ju8pw%ei%^s
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
cfg_dev_mode = False
cfg_dev_mode = false
ALLOWED_HOSTS = ["rh.ambulance-clerc.ch"]
if cfg_dev_mode:
@@ -60,6 +60,7 @@ MIDDLEWARE = [
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django_autologin.middleware.AutomaticLoginMiddleware',
]
ROOT_URLCONF = 'Reskreen.urls'
@@ -131,6 +132,8 @@ AUTH_PASSWORD_VALIDATORS = [
},
]
AUTOMATIC_LOGIN_MAX_AGE = 500 * 60*60*24 # 500 jours
# Internationalization
# https://docs.djangoproject.com/en/4.0/topics/i18n/