Restore "redirect to login page after logout" behaviour

The expected behaviour is to redirect to the login page after a user
gets logged out. This was changed accidentally during a refactoring.

This will get rid of the following error 500 in Horizon when logging
out: TemplateDoesNotExist: registration/logged_out.html.

Change-Id: Id23666e84fce1e3a212b066fcdaf71a17e4898d9
Closes-Bug: #1332167
This commit is contained in:
Julie Pichon 2014-06-19 17:43:49 +01:00
parent a78e41c1ed
commit 24bf08011d
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ def logout(request):
if token and endpoint:
delete_token(endpoint=endpoint, token_id=token.id)
""" Securely logs a user out. """
return django_auth_views.logout(request)
return django_auth_views.logout_then_login(request)
def delete_token(endpoint, token_id):