Ticket #7364: 7364-admin_login_cache-8345.diff
File 7364-admin_login_cache-8345.diff, 1.7 KB (added by , 16 years ago) |
---|
-
django/contrib/admin/views/decorators.py
12 12 from django.shortcuts import render_to_response 13 13 from django.utils.translation import ugettext_lazy, ugettext as _ 14 14 from django.utils.hashcompat import md5_constructor 15 from django.views.decorators.cache import never_cache 15 16 16 17 ERROR_MESSAGE = ugettext_lazy("Please enter a correct username and password. Note that both fields are case-sensitive.") 17 18 LOGIN_FORM_KEY = 'this_is_the_login_form' … … 32 33 'post_data': post_data, 33 34 'error_message': error_message 34 35 }, context_instance=template.RequestContext(request)) 36 _display_login_form = never_cache(_display_login_form) 35 37 36 38 def _encode_post_data(post_data): 37 39 pickled = pickle.dumps(post_data) -
django/contrib/auth/views.py
13 13 from django.utils.http import urlquote, base36_to_int 14 14 from django.utils.html import escape 15 15 from django.utils.translation import ugettext as _ 16 from django.views.decorators.cache import never_cache 16 17 from django.contrib.auth.models import User 17 18 import re 18 19 … … 43 44 redirect_field_name: redirect_to, 44 45 'site_name': current_site.name, 45 46 }, context_instance=RequestContext(request)) 47 login = never_cache(login) 46 48 47 49 def logout(request, next_page=None, template_name='registration/logged_out.html'): 48 50 "Logs out the user and displays 'You are logged out' message."