From 415bf3efb3bac1f14efc77d5bdea7a4fddef03de Mon Sep 17 00:00:00 2001 From: Gary Wilson Jr Date: Fri, 15 Aug 2008 17:10:14 +0000 Subject: [PATCH] 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 --- django/contrib/auth/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/django/contrib/auth/views.py b/django/contrib/auth/views.py index 16524fe42a..ba54f07991 100644 --- a/django/contrib/auth/views.py +++ b/django/contrib/auth/views.py @@ -14,6 +14,7 @@ from django.utils.http import urlquote, base36_to_int 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, 'site_name': current_site.name, }, 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."