From fb3e42547106c994c774635179a014f4736cd875 Mon Sep 17 00:00:00 2001 From: Martin Bley Date: Sun, 18 Sep 2022 17:48:33 +0200 Subject: [PATCH] fix for clean logout --- templates/login.html | 33 ------------------------------ templates/nav.html | 2 +- templates/registration/logout.html | 15 ++++++++++++++ tipp/urls.py | 2 +- 4 files changed, 17 insertions(+), 35 deletions(-) delete mode 100644 templates/login.html create mode 100644 templates/registration/logout.html diff --git a/templates/login.html b/templates/login.html deleted file mode 100644 index 1e8be5c..0000000 --- a/templates/login.html +++ /dev/null @@ -1,33 +0,0 @@ -{% extends "base.html" %} -{% load url from future %} -{% comment %} - Main page to authenticate users. -{% endcomment %} - -{% block head %} - TipPy | Login -{% endblock %} - -{% block nav %} -{% include "nav_login.html" with ls=ls season=season %} -{% endblock %} - -{% block body %} -{% if form.errors %} -
-

Benutzename und Passwort passen nicht zusammen. Bitte versuche es noch einmal.

-
-{% endif %} -
-
- -
-
-{% endblock %} diff --git a/templates/nav.html b/templates/nav.html index 2fff481..e75dd27 100644 --- a/templates/nav.html +++ b/templates/nav.html @@ -32,7 +32,7 @@ diff --git a/templates/registration/logout.html b/templates/registration/logout.html new file mode 100644 index 0000000..ae81917 --- /dev/null +++ b/templates/registration/logout.html @@ -0,0 +1,15 @@ +{% extends "base.html" %} +{% load url from future %} +{% comment %} + Main page to authenticate users. +{% endcomment %} + +{% block head %} + TipPy | Logout +{% endblock %} + +{% block body %} +
+

Auf wiedersehen

+
+{% endblock %} diff --git a/tipp/urls.py b/tipp/urls.py index 3403e3c..79dc6d6 100644 --- a/tipp/urls.py +++ b/tipp/urls.py @@ -23,7 +23,7 @@ urlpatterns = [ re_path(r'^blog/(?P\d)$', views.blogindex), re_path(r'^about$', views.about), re_path(r'^accounts/login/', auth_views.LoginView.as_view()), - re_path(r'^logout', auth_views.LogoutView.as_view()) + re_path(r'^accounts/logout/', auth_views.LogoutView.as_view()) ] if settings.DEBUG is True: