summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--django/contrib/admin/sites.py2
-rw-r--r--docs/releases/4.0.txt5
2 files changed, 5 insertions, 2 deletions
diff --git a/django/contrib/admin/sites.py b/django/contrib/admin/sites.py
index 7bc1519c2b..ba9b032914 100644
--- a/django/contrib/admin/sites.py
+++ b/django/contrib/admin/sites.py
@@ -358,7 +358,6 @@ class AdminSite:
"""
return JavaScriptCatalog.as_view(packages=['django.contrib.admin'])(request)
- @method_decorator(never_cache)
def logout(self, request, extra_context=None):
"""
Log out the user for the given HttpRequest.
@@ -515,7 +514,6 @@ class AdminSite:
return app_list
- @method_decorator(never_cache)
def index(self, request, extra_context=None):
"""
Display the main admin index page, which lists all of the installed
diff --git a/docs/releases/4.0.txt b/docs/releases/4.0.txt
index 7ea518cbc9..7fca85f8f9 100644
--- a/docs/releases/4.0.txt
+++ b/docs/releases/4.0.txt
@@ -311,6 +311,11 @@ Miscellaneous
:setting:`STATIC_URL`, the leading slash is removed from that setting (now
``'static/'``) in the default :djadmin:`startproject` template.
+* The :class:`~django.contrib.admin.AdminSite` method for the admin ``index``
+ view is no longer decorated with ``never_cache`` when accessed directly,
+ rather than via the recommended ``AdminSite.urls`` property, or
+ ``AdminSite.get_urls()`` method.
+
.. _deprecated-features-4.0:
Features deprecated in 4.0