diff options
| author | Jannis Leidel | 2013-12-09 19:11:38 +0100 | 
|---|---|---|
| committer | Jannis Leidel | 2013-12-09 19:11:38 +0100 | 
| commit | bdbe57d6e13241f852860336f55bca0d88bd4384 (patch) | |
| tree | 15565067abea6920361c8df64d1e0ef8795a42d7 | |
| parent | ebc16cb2a5c9098d91ca3033626808f73e58afad (diff) | |
| download | django-debug-toolbar-bdbe57d6e13241f852860336f55bca0d88bd4384.tar.bz2 | |
Storing the original on module level.
| -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): | 
