Skip to content

Commit

Permalink
Fixed #32493 -- Removed redundant never_cache uses from admin views.
Browse files Browse the repository at this point in the history
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
  • Loading branch information
tim-mccurrach and carltongibson committed Mar 3, 2021
1 parent 2b1de3d commit f55f3ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 0 additions & 2 deletions django/contrib/admin/sites.py
Expand Up @@ -358,7 +358,6 @@ def i18n_javascript(self, request, extra_context=None):
"""
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.
Expand Down Expand Up @@ -515,7 +514,6 @@ def get_app_list(self, request):

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
Expand Down
5 changes: 5 additions & 0 deletions docs/releases/4.0.txt
Expand Up @@ -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
Expand Down

0 comments on commit f55f3ce

Please sign in to comment.