Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fixed #7364 -- Never cache the contrib.auth login view.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 90c67e0 commit 415bf3efb3bac1f14efc77d5bdea7a4fddef03de @gdub gdub committed
Showing with 2 additions and 0 deletions.
  1. +2 −0  django/contrib/auth/
2  django/contrib/auth/
@@ -14,6 +14,7 @@
from django.utils.html import escape
from django.utils.translation import ugettext as _
from django.contrib.auth.models import User
+from django.views.decorators.cache import never_cache
import re
def login(request, template_name='registration/login.html', redirect_field_name=REDIRECT_FIELD_NAME):
@@ -43,6 +44,7 @@ def login(request, template_name='registration/login.html', redirect_field_name=
redirect_field_name: redirect_to,
}, context_instance=RequestContext(request))
+login = never_cache(login)
def logout(request, next_page=None, template_name='registration/logged_out.html'):
"Logs out the user and displays 'You are logged out' message."

0 comments on commit 415bf3e

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