diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2006-07-23 23:14:36 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2006-07-23 23:14:36 +0000 |
| commit | 564d5565193224a1e2404c55bb4c63d5dcab8bcf (patch) | |
| tree | bfe942bf61911a7fdffc77ecd0005d4182de9b38 | |
| parent | 20831e0d2f0a1b294ed0b52b92c6e1b34dc49026 (diff) | |
Fixed #2405 -- Fixed recursion error in auth.views.logout(), caused by [3402]. Thanks, Jay Skabber
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3431 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/contrib/auth/views.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/django/contrib/auth/views.py b/django/contrib/auth/views.py index 0ffa35bcff..428efe6239 100644 --- a/django/contrib/auth/views.py +++ b/django/contrib/auth/views.py @@ -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)) else: # Redirect to this page until the session has been cleared. |
