Ticket #7364: admin_login_cache.diff

File admin_login_cache.diff, 1.4 KB (added by permon, 7 years ago)
  • django/contrib/admin/views/decorators.py

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

    99from django.template import RequestContext
    1010from django.utils.http import urlquote
    1111from django.utils.translation import ugettext as _
     12from django.views.decorators.cache import never_cache
    1315def login(request, template_name='registration/login.html', redirect_field_name=REDIRECT_FIELD_NAME):
    1416    "Displays the login form and handles the login action."
    1517    manipulator = AuthenticationForm()
Back to Top