From dab6bf83f9eae113497df6ad2e40cce65ed6543b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89lie=20Bouttier?= Date: Sun, 12 Jun 2016 18:47:26 +0200 Subject: [PATCH] auth related minor changes --- .../templates/registration/logged_out.html | 21 ------------------- accounts/templates/registration/login.html | 6 ++++++ .../registration/password_change_form.html | 2 +- accounts/urls.py | 2 ++ ponyconf/templates/base.html | 1 + 5 files changed, 10 insertions(+), 22 deletions(-) delete mode 100644 accounts/templates/registration/logged_out.html diff --git a/accounts/templates/registration/logged_out.html b/accounts/templates/registration/logged_out.html deleted file mode 100644 index 89a935c..0000000 --- a/accounts/templates/registration/logged_out.html +++ /dev/null @@ -1,21 +0,0 @@ -{% extends 'base.html' %} - -{% load bootstrap3 %} - -{% block content %} - - - -
-
-
-

You are not logged in anymore. Login again ?

-
-
-
- -{% endblock %} diff --git a/accounts/templates/registration/login.html b/accounts/templates/registration/login.html index a2b5acc..fdc5adc 100644 --- a/accounts/templates/registration/login.html +++ b/accounts/templates/registration/login.html @@ -26,4 +26,10 @@ +
+
+ You do not have an account? Please register. +
+
+ {% endblock %} diff --git a/accounts/templates/registration/password_change_form.html b/accounts/templates/registration/password_change_form.html index 58ba91f..140a98d 100644 --- a/accounts/templates/registration/password_change_form.html +++ b/accounts/templates/registration/password_change_form.html @@ -18,7 +18,7 @@ {% csrf_token %}
- Cancel + Cancel
diff --git a/accounts/urls.py b/accounts/urls.py index 5613344..3143204 100644 --- a/accounts/urls.py +++ b/accounts/urls.py @@ -1,8 +1,10 @@ from django.conf.urls import include, url +from django.contrib.auth import views as auth_views from .views import profile urlpatterns = [ url(r'^profile$', profile, name='profile'), + url(r'^logout/$', auth_views.logout, {'next_page': '/'}, name='logout'), url(r'', include('django.contrib.auth.urls')), ] diff --git a/ponyconf/templates/base.html b/ponyconf/templates/base.html index 70b12c2..dc9b584 100644 --- a/ponyconf/templates/base.html +++ b/ponyconf/templates/base.html @@ -59,6 +59,7 @@
  • {% else %}
  •  Login
  • +
  •  Register
  • {% endif %} {% block navbar-right %}{% endblock %}