Ticket #2405: logout.diff

File logout.diff, 738 bytes (added by jay@…, 18 years ago)
  • trunk/django/contrib/auth/views.py

     
    3434def logout(request, next_page=None, template_name='registration/logged_out.html'):
    3535    "Logs out the user and displays 'You are logged out' message."
    3636    from django.contrib.auth import logout
    37     try:
    38         logout(request)
    39     except KeyError:
     37    logout(request)
     38    if next_page == None:
    4039        return render_to_response(template_name, {'title': _('Logged out')}, context_instance=RequestContext(request))
    4140    else:
    4241        # Redirect to this page until the session has been cleared.
Back to Top