Ticket #7364: 7364-admin_login_cache-8345.diff

File 7364-admin_login_cache-8345.diff, 1.7 KB (added by Joost Cassee, 16 years ago)
  • django/contrib/admin/views/decorators.py

     
    1212from django.shortcuts import render_to_response
    1313from django.utils.translation import ugettext_lazy, ugettext as _
    1414from django.utils.hashcompat import md5_constructor
     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'
     
    3233        'post_data': post_data,
    3334        'error_message': error_message
    3435    }, context_instance=template.RequestContext(request))
     36_display_login_form = never_cache(_display_login_form)
    3537
    3638def _encode_post_data(post_data):
    3739    pickled = pickle.dumps(post_data)
  • django/contrib/auth/views.py

     
    1313from django.utils.http import urlquote, base36_to_int
    1414from django.utils.html import escape
    1515from django.utils.translation import ugettext as _
     16from django.views.decorators.cache import never_cache
    1617from django.contrib.auth.models import User
    1718import re
    1819
     
    4344        redirect_field_name: redirect_to,
    4445        'site_name': current_site.name,
    4546    }, context_instance=RequestContext(request))
     47login = never_cache(login)
    4648
    4749def logout(request, next_page=None, template_name='registration/logged_out.html'):
    4850    "Logs out the user and displays 'You are logged out' message."
Back to Top