Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8383 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 415bf3efb3bac1f14efc77d5bdea7a4fddef03de 1 parent 90c67e0
Gary Wilson Jr. authored August 15, 2008

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

  1. 2  django/contrib/auth/views.py
2  django/contrib/auth/views.py
@@ -14,6 +14,7 @@
14 14
 from django.utils.html import escape
15 15
 from django.utils.translation import ugettext as _
16 16
 from django.contrib.auth.models import User
  17
+from django.views.decorators.cache import never_cache
17 18
 import re
18 19
 
19 20
 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=
43 44
         redirect_field_name: redirect_to,
44 45
         'site_name': current_site.name,
45 46
     }, context_instance=RequestContext(request))
  47
+login = never_cache(login)
46 48
 
47 49
 def logout(request, next_page=None, template_name='registration/logged_out.html'):
48 50
     "Logs out the user and displays 'You are logged out' message."

0 notes on commit 415bf3e

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