diff --git a/debug_toolbar/panels/staticfiles.py b/debug_toolbar/panels/staticfiles.py index 10661908b..b99b45791 100644 --- a/debug_toolbar/panels/staticfiles.py +++ b/debug_toolbar/panels/staticfiles.py @@ -5,7 +5,6 @@ from django.conf import settings from django.contrib.staticfiles import finders, storage -from django.contrib.staticfiles.templatetags import staticfiles from django.core.files.storage import get_storage_class from django.utils.encoding import python_2_unicode_compatible from django.utils.functional import LazyObject @@ -97,14 +96,10 @@ def __init__(self, *args, **kwargs): self._paths = {} def enable_instrumentation(self): - storage.staticfiles_storage = ( - staticfiles.staticfiles_storage - ) = DebugConfiguredStorage() + storage.staticfiles_storage = DebugConfiguredStorage() def disable_instrumentation(self): - storage.staticfiles_storage = ( - staticfiles.staticfiles_storage - ) = _original_storage + storage.staticfiles_storage = _original_storage @property def num_used(self): diff --git a/docs/changes.rst b/docs/changes.rst index 8b933eb91..00d520b04 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -4,6 +4,8 @@ Change log UNRELEASED ---------- +* Updated ``StaticFilesPanel`` to be compatible with Django 3.0. + 1.11 (2018-12-03) -----------------