From 485ac1294cb37a70b671b06ecd2370ca266dd275 Mon Sep 17 00:00:00 2001 From: Benbb96 Date: Wed, 8 May 2024 15:47:14 +0200 Subject: [PATCH] remove next_page parameter and show how to set LOGOUT_REDIRECT_URL in settings --- demo/demodesk/config/settings.py | 2 ++ helpdesk/urls.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/demo/demodesk/config/settings.py b/demo/demodesk/config/settings.py index a8366d22..6e99d4f0 100644 --- a/demo/demodesk/config/settings.py +++ b/demo/demodesk/config/settings.py @@ -124,6 +124,8 @@ HELPDESK_SHOW_CHANGE_PASSWORD = True HELPDESK_REDIRECT_TO_LOGIN_BY_DEFAULT = False LOGIN_URL = 'helpdesk:login' LOGIN_REDIRECT_URL = 'helpdesk:home' +# You can also redirect to a specific page after logging out (instead of logout page) +# LOGOUT_REDIRECT_URL = 'helpdesk:home' # Database # - by default, we use SQLite3 for the demo, but you can also diff --git a/helpdesk/urls.py b/helpdesk/urls.py index 752d40fc..224d7fa2 100644 --- a/helpdesk/urls.py +++ b/helpdesk/urls.py @@ -215,7 +215,7 @@ urlpatterns += [ path( "logout/", auth_views.LogoutView.as_view( - template_name="helpdesk/registration/login.html", next_page=reverse_lazy("helpdesk:home") + template_name="helpdesk/registration/logged_out.html" ), name="logout", ),