Redirect user to login page after logout
This commit is contained in:
parent
f61023d01a
commit
5903e10d87
1 changed files with 7 additions and 1 deletions
|
@ -441,7 +441,13 @@ class DeleteAccount(LoginRequiredMixin, View):
|
|||
class LogOut(View):
|
||||
def get(self, request):
|
||||
logout(request)
|
||||
return HttpResponse("You have been logged out.", status=200)
|
||||
return HttpResponse(
|
||||
"You have been logged out. You will be redirected in 2 seconds."
|
||||
"<script>"
|
||||
"setTimeout(function (){document.location.href='/';}, 2000);"
|
||||
"</script>",
|
||||
status=200
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue