aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar/panels/staticfiles.py
diff options
context:
space:
mode:
authorJannis Leidel2013-12-09 19:11:38 +0100
committerJannis Leidel2013-12-09 19:11:38 +0100
commitbdbe57d6e13241f852860336f55bca0d88bd4384 (patch)
tree15565067abea6920361c8df64d1e0ef8795a42d7 /debug_toolbar/panels/staticfiles.py
parentebc16cb2a5c9098d91ca3033626808f73e58afad (diff)
downloaddjango-debug-toolbar-bdbe57d6e13241f852860336f55bca0d88bd4384.tar.bz2
Storing the original on module level.
Diffstat (limited to 'debug_toolbar/panels/staticfiles.py')
-rw-r--r--debug_toolbar/panels/staticfiles.py5
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):