On rétablit authens et on passe à Django 3.2

This commit is contained in:
Tom Hubrecht 2021-04-09 03:22:41 +02:00
parent 5b5da17c26
commit a39a73df9d
3 changed files with 11 additions and 6 deletions

View file

@ -5,6 +5,8 @@ Settings communs entre setups de dev et de production.
import os
import sys
from django.urls import reverse_lazy
# ---
# Secrets
# ---
@ -50,7 +52,7 @@ INSTALLED_APPS = [
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
"django_cas_ng",
"authens",
"fiches",
]
@ -84,11 +86,13 @@ TEMPLATES = [
AUTHENTICATION_BACKENDS = (
"django.contrib.auth.backends.ModelBackend",
"django_cas_ng.backends.CASBackend",
"fiches.backends.BackendFiches",
)
WSGI_APPLICATION = "annuaire.wsgi.application"
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
# Internationalization
# https://docs.djangoproject.com/en/dev/topics/i18n/
@ -102,8 +106,9 @@ USE_TZ = True
# Settings CAS
# ---
CAS_SERVER_URL = "https://cas.eleves.ens.fr/"
CAS_VERSION = "2"
LOGIN_URL = reverse_lazy("authens:login")
LOGOUT_REDIRECT_URL = reverse_lazy("home")
AUTHENS_USE_OLDCAS = False
# ---
# LDAP et annuaire ENS

View file

@ -43,7 +43,7 @@ MEDIA_URL = "/media/"
CACHES = {
"default": {
"BACKEND": "redis_cache.RedisCache",
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "redis://:{passwd}@{host}:{port}/{db}".format(
passwd=REDIS_PASSWD, host=REDIS_HOST, port=REDIS_PORT, db=REDIS_DB
),

View file

@ -1,4 +1,4 @@
django==2.2.*
django==3.2.*
Pillow
python-ldap
authens