From f8f353f3e2a560ae9da332f7209bf0fcd5e54276 Mon Sep 17 00:00:00 2001 From: jluiselli Date: Tue, 15 Sep 2020 13:32:11 +0200 Subject: [PATCH] working auth with CAS --- annuaire/urls.py | 2 +- fiches/models.py | 2 ++ fiches/templates/fiches/base.html | 2 +- fiches/templates/fiches/birthday.html | 2 +- fiches/templates/fiches/home.html | 2 +- fiches/urls.py | 2 +- fiches/views.py | 6 +++--- 7 files changed, 10 insertions(+), 8 deletions(-) diff --git a/annuaire/urls.py b/annuaire/urls.py index 85e272c..8fb9c48 100644 --- a/annuaire/urls.py +++ b/annuaire/urls.py @@ -25,7 +25,7 @@ urlpatterns = [ path('fiche/', include('fiches.urls')), path('', home, name='home'), path('birthday', birthday, name='birthday'), - path('login', cas_views.LoginView.as_view(), name='cas_ng_login'), + path('accounts/login/', cas_views.LoginView.as_view(), name='cas_ng_login'), path('logout', cas_views.LogoutView.as_view(), name='cas_ng_logout'), ] diff --git a/fiches/models.py b/fiches/models.py index 9b023ce..a750a06 100644 --- a/fiches/models.py +++ b/fiches/models.py @@ -31,6 +31,8 @@ class Profile(models.Model): default=False, verbose_name=_("conserver la fiche annuaire ?") ) + + def __str__(self): return self.full_name diff --git a/fiches/templates/fiches/base.html b/fiches/templates/fiches/base.html index dd66119..2731e34 100644 --- a/fiches/templates/fiches/base.html +++ b/fiches/templates/fiches/base.html @@ -27,7 +27,7 @@