From 26455ae5c61b760c3da3678bdd681a560839828b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20P=C3=A9pin?= Date: Tue, 15 Sep 2020 00:44:42 +0200 Subject: [PATCH] Monkey-patch authens to make it look like GestioCOF --- cof/settings/bds_prod.py | 4 +--- cof/settings/common.py | 3 +++ .../static/gestioncof/css/authens_extra.css | 15 +++++++++++++++ gestioncof/templates/authens/base.html | 8 ++++++++ 4 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 gestioncof/static/gestioncof/css/authens_extra.css create mode 100644 gestioncof/templates/authens/base.html diff --git a/cof/settings/bds_prod.py b/cof/settings/bds_prod.py index 12f5a552..3d6ac5a8 100644 --- a/cof/settings/bds_prod.py +++ b/cof/settings/bds_prod.py @@ -11,7 +11,7 @@ from .common import INSTALLED_APPS ALLOWED_HOSTS = ["bds.ens.fr", "www.bds.ens.fr", "dev.cof.ens.fr"] -INSTALLED_APPS += ["bds", "events", "clubs", "authens"] +INSTALLED_APPS += ["bds", "events", "clubs"] STATIC_ROOT = "/srv/bds.ens.fr/public/gestion2/static" STATIC_URL = "/gestion2/static/" @@ -29,8 +29,6 @@ AUTHENTICATION_BACKENDS = [ "authens.backends.OldCASBackend", ] -AUTHENS_USE_OLDCAS = False - LOGIN_URL = "authens:login" LOGIN_REDIRECT_URL = "bds:home" LOGOUT_REDIRECT_URL = "bds:home" diff --git a/cof/settings/common.py b/cof/settings/common.py index 4636ace3..f8645b98 100644 --- a/cof/settings/common.py +++ b/cof/settings/common.py @@ -69,6 +69,7 @@ INSTALLED_APPS = [ "django_cas_ng", "bootstrapform", "widget_tweaks", + "authens", ] MIDDLEWARE = [ @@ -141,3 +142,5 @@ CAS_LOGIN_MSG = None CAS_IGNORE_REFERER = True CAS_REDIRECT_URL = "/" CAS_EMAIL_FORMAT = "%s@clipper.ens.fr" + +AUTHENS_USE_OLDCAS = False diff --git a/gestioncof/static/gestioncof/css/authens_extra.css b/gestioncof/static/gestioncof/css/authens_extra.css new file mode 100644 index 00000000..c0204201 --- /dev/null +++ b/gestioncof/static/gestioncof/css/authens_extra.css @@ -0,0 +1,15 @@ +html, body { + background-color : #A7D4CD; + font-family: 'Roboto', sans-serif; + font-weight: 300; +} + +#container-title, input[type="submit"] { + background: #4F504B; +} + +.cas { background: #49A5E3; } +.big-button.cas:hover { background: #71B5E3; } + +.exte { background: #E36748; } +.big-button.exte:hover { background: #E38871; } diff --git a/gestioncof/templates/authens/base.html b/gestioncof/templates/authens/base.html new file mode 100644 index 00000000..4219fa21 --- /dev/null +++ b/gestioncof/templates/authens/base.html @@ -0,0 +1,8 @@ +{% extends "authens/base.html" %} + +{% load static %} + +{% block extra_css %} + + +{% endblock %}