Skip to content
Browse files

Fixed #2405 -- Fixed recursion error in auth.views.logout(), caused b…

…y [3402]. Thanks, Jay Skabber

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 20831e0 commit 564d5565193224a1e2404c55bb4c63d5dcab8bcf @adrianholovaty adrianholovaty committed
Showing with 2 additions and 3 deletions.
  1. +2 −3 django/contrib/auth/
5 django/contrib/auth/
@@ -34,9 +34,8 @@ def login(request, template_name='registration/login.html'):
def logout(request, next_page=None, template_name='registration/logged_out.html'):
"Logs out the user and displays 'You are logged out' message."
from django.contrib.auth import logout
- try:
- logout(request)
- except KeyError:
+ logout(request)
+ if next_page is None:
return render_to_response(template_name, {'title': _('Logged out')}, context_instance=RequestContext(request))
# Redirect to this page until the session has been cleared.

0 comments on commit 564d556

Please sign in to comment.
Something went wrong with that request. Please try again.