Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

newforms-admin: Fixed #6566 - restored never_cache() decorator to adm…

…in views.

git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@7737 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 1acafa098956f7cbedcd9130130367a5bbd564ab 1 parent 56584a6
Luke Plant spookylukey authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 django/contrib/admin/sites.py
5 django/contrib/admin/sites.py
View
@@ -6,6 +6,7 @@
from django.utils.safestring import mark_safe
from django.utils.text import capfirst
from django.utils.translation import ugettext_lazy, ugettext as _
+from django.views.decorators.cache import never_cache
import base64
import cPickle as pickle
import datetime
@@ -152,6 +153,7 @@ def model_page(self, request, app_label, model_name, rest_of_url=None):
except KeyError:
raise http.Http404("This model exists but has not been registered with the admin site.")
return admin_obj(request, rest_of_url)
+ model_page = never_cache(model_page)
def password_change(self, request):
"""
@@ -196,6 +198,7 @@ def logout(self, request):
"""
from django.contrib.auth.views import logout
return logout(request)
+ logout = never_cache(logout)
def login(self, request):
"""
@@ -255,6 +258,7 @@ def login(self, request):
return http.HttpResponseRedirect(request.path)
else:
return self.display_login_form(request, ERROR_MESSAGE)
+ login = never_cache(login)
def index(self, request, extra_context=None):
"""
@@ -308,6 +312,7 @@ def index(self, request, extra_context=None):
return render_to_response(self.index_template or 'admin/index.html', context,
context_instance=template.RequestContext(request)
)
+ index = never_cache(index)
def display_login_form(self, request, error_message='', extra_context=None):
request.session.set_test_cookie()
Please sign in to comment.
Something went wrong with that request. Please try again.