diff options
| -rw-r--r-- | debug_toolbar/panels/staticfiles.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/debug_toolbar/panels/staticfiles.py b/debug_toolbar/panels/staticfiles.py index 9813609..f212f2b 100644 --- a/debug_toolbar/panels/staticfiles.py +++ b/debug_toolbar/panels/staticfiles.py @@ -75,6 +75,8 @@ class DebugConfiguredStorage(LazyObject): self._wrapped = DebugStaticFilesStorage(collector) +_original_storage = storage.staticfiles_storage + class StaticFilesPanel(panels.Panel): """ @@ -94,11 +96,10 @@ class StaticFilesPanel(panels.Panel): self._paths = {} def enable_instrumentation(self): - self._unpatched_staticfiles_storage = storage.staticfiles_storage storage.staticfiles_storage = staticfiles.staticfiles_storage = DebugConfiguredStorage() def disable_instrumentation(self): - storage.staticfiles_storage = staticfiles.staticfiles_storage = self._unpatched_staticfiles_storage + storage.staticfiles_storage = staticfiles.staticfiles_storage = _original_storage @property def has_content(self): |
