From 135129769e0e61aa984cb127e3181729f5d18c53 Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Sun, 18 Mar 2018 11:53:11 +0100 Subject: [PATCH] Navbar plus propre. --- templates/edit.html | 3 +++ templates/nav_bar.html | 18 +++++++----------- users/urls.py | 8 +++++++- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/templates/edit.html b/templates/edit.html index beb96c7..96c2d8e 100644 --- a/templates/edit.html +++ b/templates/edit.html @@ -14,4 +14,7 @@ {% endif %} +{% if link %} +{{link_text}} +{% endif %} {% endblock %} diff --git a/templates/nav_bar.html b/templates/nav_bar.html index 215eae3..4a13400 100644 --- a/templates/nav_bar.html +++ b/templates/nav_bar.html @@ -18,7 +18,7 @@ {% for c in categories %} {% endfor %} {% for p in static_pages %} @@ -30,27 +30,23 @@ diff --git a/users/urls.py b/users/urls.py index 30e307e..1949fc5 100644 --- a/users/urls.py +++ b/users/urls.py @@ -12,7 +12,13 @@ urlpatterns = [ ), path( 'login', - auth_views.LoginView.as_view(template_name="edit.html"), + auth_views.LoginView.as_view( + template_name="edit.html", + extra_context={ + 'link_text':"Mot de passe oublié", + 'link':reverse_lazy('users:password-reset') + } + ), name='login' ), path(