Ticket #7364: admin_login_cache.diff
File admin_login_cache.diff, 1.4 KB (added by , 16 years ago) |
---|
-
django/contrib/admin/views/decorators.py
13 13 from django.shortcuts import render_to_response 14 14 from django.utils.translation import ugettext_lazy, ugettext as _ 15 15 from django.utils.safestring import mark_safe 16 from django.views.decorators.cache import never_cache 16 17 17 18 ERROR_MESSAGE = ugettext_lazy("Please enter a correct username and password. Note that both fields are case-sensitive.") 18 19 LOGIN_FORM_KEY = 'this_is_the_login_form' 19 20 21 @never_cache 20 22 def _display_login_form(request, error_message=''): 21 23 request.session.set_test_cookie() 22 24 if request.POST and 'post_data' in request.POST: -
django/contrib/auth/views.py
9 9 from django.template import RequestContext 10 10 from django.utils.http import urlquote 11 11 from django.utils.translation import ugettext as _ 12 from django.views.decorators.cache import never_cache 12 13 14 @never_cache 13 15 def login(request, template_name='registration/login.html', redirect_field_name=REDIRECT_FIELD_NAME): 14 16 "Displays the login form and handles the login action." 15 17 manipulator = AuthenticationForm()