Skip to content

Commit 5a353e2

Browse files
committed
Redirect to homepage page after logout
1 parent e14ff33 commit 5a353e2

4 files changed

Lines changed: 23 additions & 50 deletions

File tree

locale/en/LC_MESSAGES/django.po

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ msgid ""
66
msgstr ""
77
"Project-Id-Version: PACKAGE VERSION\n"
88
"Report-Msgid-Bugs-To: \n"
9-
"POT-Creation-Date: 2026-05-22 16:08+0300\n"
9+
"POT-Creation-Date: 2026-05-29 15:19+0300\n"
1010
"PO-Revision-Date: 2021-05-27 14:47+0300\n"
11-
"Last-Translator: Jimmy Ihalainen <jimmy.ihalainen@aalto.fi>\n"
11+
"Last-Translator: Jimmy Lumiaho <jimmy.lumiaho@aalto.fi>\n"
1212
"Language-Team: English<>\n"
1313
"Language: en_GB\n"
1414
"MIME-Version: 1.0\n"
@@ -6118,16 +6118,6 @@ msgstr "Password"
61186118
msgid "SHOW_MORE_LOGIN_OPTIONS"
61196119
msgstr "Show more login options"
61206120

6121-
#: userprofile/templates/userprofile/logout.html
6122-
msgid "LOGGED_OUT"
6123-
msgstr "Logged out"
6124-
6125-
#: userprofile/templates/userprofile/logout.html
6126-
msgid "LOGGED_OUT_SUCCESSFULLY"
6127-
msgstr ""
6128-
"You have successfully logged out. Please close the browser if you were using "
6129-
"a public computer to clear your remaining sessions. "
6130-
61316121
#: userprofile/templates/userprofile/profile.html
61326122
msgid "[UNKNOWN_NAME]"
61336123
msgstr "[Unknown name]"
@@ -6231,6 +6221,12 @@ msgstr "Starting time"
62316221
msgid "ENDING_TIME"
62326222
msgstr "Ending time"
62336223

6224+
#: userprofile/views.py
6225+
msgid "LOGGED_OUT_SUCCESSFULLY"
6226+
msgstr ""
6227+
"You have successfully logged out. Please close the browser if you were using "
6228+
"a public computer to clear your remaining sessions. "
6229+
62346230
#: userprofile/views.py
62356231
msgid "NO_PRIVACY_NOTICE"
62366232
msgstr "No privacy notice. Please notify administration!"

locale/fi/LC_MESSAGES/django.po

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ msgid ""
66
msgstr ""
77
"Project-Id-Version: \n"
88
"Report-Msgid-Bugs-To: \n"
9-
"POT-Creation-Date: 2026-05-22 16:08+0300\n"
9+
"POT-Creation-Date: 2026-05-29 15:19+0300\n"
1010
"PO-Revision-Date: 2019-08-14 12:16+0200\n"
11-
"Last-Translator: Jimmy Ihalainen <jimmy.ihalainen@aalto.fi>\n"
11+
"Last-Translator: Jimmy Lumiaho <jimmy.lumiaho@aalto.fi>\n"
1212
"Language-Team: Finnish <>\n"
1313
"Language: fi_FI\n"
1414
"MIME-Version: 1.0\n"
@@ -6138,16 +6138,6 @@ msgstr "Salasana"
61386138
msgid "SHOW_MORE_LOGIN_OPTIONS"
61396139
msgstr "Näytä lisää kirjautumisvaihtoehtoja"
61406140

6141-
#: userprofile/templates/userprofile/logout.html
6142-
msgid "LOGGED_OUT"
6143-
msgstr "Olet kirjautunut ulos"
6144-
6145-
#: userprofile/templates/userprofile/logout.html
6146-
msgid "LOGGED_OUT_SUCCESSFULLY"
6147-
msgstr ""
6148-
"Olet kirjautunut onnistuneesti ulos palvelusta. Jos käytät julkista "
6149-
"tietokonetta, sulje selain poistaaksesi istunnon tiedot."
6150-
61516141
#: userprofile/templates/userprofile/profile.html
61526142
msgid "[UNKNOWN_NAME]"
61536143
msgstr "[Tuntematon nimi]"
@@ -6254,6 +6244,12 @@ msgstr "Alkamisaika"
62546244
msgid "ENDING_TIME"
62556245
msgstr "Päättymisaika"
62566246

6247+
#: userprofile/views.py
6248+
msgid "LOGGED_OUT_SUCCESSFULLY"
6249+
msgstr ""
6250+
"Olet kirjautunut onnistuneesti ulos palvelusta. Jos käytät julkista "
6251+
"tietokonetta, sulje selain poistaaksesi istunnon tiedot."
6252+
62576253
#: userprofile/views.py
62586254
msgid "NO_PRIVACY_NOTICE"
62596255
msgstr "Ei tietosuojailmoitusta. Ota yhteys ylläpitäjään!"

userprofile/templates/userprofile/logout.html

Lines changed: 0 additions & 21 deletions
This file was deleted.

userprofile/views.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from urllib.parse import unquote
55

66
from django.conf import settings
7+
from django.contrib import messages
78
from django.contrib.auth.decorators import login_required
89
from django.contrib.auth.views import LoginView, LogoutView
910
from django.core.cache import cache
@@ -83,11 +84,12 @@ def get_context_data(self, **kwargs):
8384
return context
8485

8586
class AplusLogoutView(LogoutView):
86-
template_name = "userprofile/logout.html"
87-
def get_context_data(self, **kwargs):
88-
context = super().get_context_data(**kwargs)
89-
context["show_language_toggle"] = True
90-
return context
87+
next_page = '/'
88+
89+
def dispatch(self, request, *args, **kwargs):
90+
response = super().dispatch(request, *args, **kwargs)
91+
messages.success(request, _('LOGGED_OUT_SUCCESSFULLY'))
92+
return response
9193

9294
def set_user_language(request):
9395
"""Overrides set_language function from django.views.i18n."""

0 commit comments

Comments
 (0)