Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

…y [3402]. Thanks, Jay Skabber

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3431 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 564d5565193224a1e2404c55bb4c63d5dcab8bcf 1 parent 20831e0
Adrian Holovaty authored

Showing 1 changed file with 2 additions and 3 deletions. Show diff stats Hide diff stats

  1. 5  django/contrib/auth/views.py
5  django/contrib/auth/views.py
@@ -34,9 +34,8 @@ def login(request, template_name='registration/login.html'):
34 34
 def logout(request, next_page=None, template_name='registration/logged_out.html'):
35 35
     "Logs out the user and displays 'You are logged out' message."
36 36
     from django.contrib.auth import logout
37  
-    try:
38  
-        logout(request)
39  
-    except KeyError:
  37
+    logout(request)
  38
+    if next_page is None:
40 39
         return render_to_response(template_name, {'title': _('Logged out')}, context_instance=RequestContext(request))
41 40
     else:
42 41
         # Redirect to this page until the session has been cleared.

0 notes on commit 564d556

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