Skip to content

Commit da38d0e

Browse files
authored
Merge pull request #1128 from jdufresne/static-panel
Handle removed staticfiles.templatetags in Django 3.0
2 parents 5db810c + 198e5e0 commit da38d0e

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

debug_toolbar/panels/staticfiles.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
from django.conf import settings
77
from django.contrib.staticfiles import finders, storage
8-
from django.contrib.staticfiles.templatetags import staticfiles
98
from django.core.files.storage import get_storage_class
109
from django.utils.encoding import python_2_unicode_compatible
1110
from django.utils.functional import LazyObject
@@ -97,14 +96,10 @@ def __init__(self, *args, **kwargs):
9796
self._paths = {}
9897

9998
def enable_instrumentation(self):
100-
storage.staticfiles_storage = (
101-
staticfiles.staticfiles_storage
102-
) = DebugConfiguredStorage()
99+
storage.staticfiles_storage = DebugConfiguredStorage()
103100

104101
def disable_instrumentation(self):
105-
storage.staticfiles_storage = (
106-
staticfiles.staticfiles_storage
107-
) = _original_storage
102+
storage.staticfiles_storage = _original_storage
108103

109104
@property
110105
def num_used(self):

docs/changes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Change log
44
UNRELEASED
55
----------
66

7+
* Updated ``StaticFilesPanel`` to be compatible with Django 3.0.
8+
79
1.11 (2018-12-03)
810
-----------------
911

0 commit comments

Comments
 (0)