Ticket #7364: admin_login_cache-8161.diff

File admin_login_cache-8161.diff, 1.4 KB (added by Joost Cassee, 16 years ago)

Updated patch to revision 8161

  • django/contrib/admin/views/decorators.py

     
    1212from django.contrib.auth import authenticate, login
    1313from django.shortcuts import render_to_response
    1414from django.utils.translation import ugettext_lazy, ugettext as _
     15from django.views.decorators.cache import never_cache
    1516
    1617ERROR_MESSAGE = ugettext_lazy("Please enter a correct username and password. Note that both fields are case-sensitive.")
    1718LOGIN_FORM_KEY = 'this_is_the_login_form'
    1819
     20@never_cache
    1921def _display_login_form(request, error_message=''):
    2022    request.session.set_test_cookie()
    2123    if request.POST and 'post_data' in request.POST:
  • django/contrib/auth/views.py

     
    1212from django.utils.translation import ugettext as _
    1313from django.contrib.auth.models import User
    1414import re
     15from django.views.decorators.cache import never_cache
    1516
     17@never_cache
    1618def login(request, template_name='registration/login.html', redirect_field_name=REDIRECT_FIELD_NAME):
    1719    "Displays the login form and handles the login action."
    1820    redirect_to = request.REQUEST.get(redirect_field_name, '')
Back to Top