Monkey-patch authens to make it look like GestioCOF

This commit is contained in:
Martin Pépin 2020-09-15 00:44:42 +02:00
parent 3869c02dfa
commit 26455ae5c6
No known key found for this signature in database
GPG key ID: E7520278B1774448
4 changed files with 27 additions and 3 deletions

View file

@ -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"

View file

@ -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

View file

@ -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; }

View file

@ -0,0 +1,8 @@
{% extends "authens/base.html" %}
{% load static %}
{% block extra_css %}
<link type="text/css" rel="stylesheet" href="{% static "fonts/Roboto/roboto.css" %}" />
<link type="text/css" rel="stylesheet" href="{% static "gestioncof/css/authens_extra.css" %}" />
{% endblock %}