diff --git a/fet2020/authentications/views.py b/fet2020/authentications/views.py index 61050c91..b161a9e6 100644 --- a/fet2020/authentications/views.py +++ b/fet2020/authentications/views.py @@ -45,7 +45,11 @@ def loginPage(request): def logoutUser(request): logout(request) - response = redirect("home") + try: + response = redirect(request.GET.get("next")) + except: + response = redirect("home") + response = del_ep_cookie(request, response) return response diff --git a/fet2020/templates/authentications/login.html b/fet2020/templates/authentications/login.html index 20fc8a90..3e9b5562 100644 --- a/fet2020/templates/authentications/login.html +++ b/fet2020/templates/authentications/login.html @@ -1,7 +1,7 @@ {% extends 'layout.html' %} {% block content %} -