remove next_page parameter and show how to set LOGOUT_REDIRECT_URL in settings

This commit is contained in:
Benbb96 2024-05-08 15:47:14 +02:00
parent b1316214c7
commit 485ac1294c
No known key found for this signature in database
2 changed files with 3 additions and 1 deletions

View File

@ -124,6 +124,8 @@ HELPDESK_SHOW_CHANGE_PASSWORD = True
HELPDESK_REDIRECT_TO_LOGIN_BY_DEFAULT = False HELPDESK_REDIRECT_TO_LOGIN_BY_DEFAULT = False
LOGIN_URL = 'helpdesk:login' LOGIN_URL = 'helpdesk:login'
LOGIN_REDIRECT_URL = 'helpdesk:home' 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 # Database
# - by default, we use SQLite3 for the demo, but you can also # - by default, we use SQLite3 for the demo, but you can also

View File

@ -215,7 +215,7 @@ urlpatterns += [
path( path(
"logout/", "logout/",
auth_views.LogoutView.as_view( 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", name="logout",
), ),