aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar/panels/staticfiles.py
diff options
context:
space:
mode:
authorJannis Leidel2013-12-23 12:43:49 +0100
committerJannis Leidel2013-12-23 12:43:49 +0100
commit4225671177f9f65e873ddbab373e5968c2afa8fc (patch)
tree7c7b8f5280ed84d49af311a56e1039706ce9029a /debug_toolbar/panels/staticfiles.py
parent9298aff6ed93cd2463730f31c1576bf9e396084e (diff)
downloaddjango-debug-toolbar-4225671177f9f65e873ddbab373e5968c2afa8fc.tar.bz2
Fix staticfiles panel to work with prefixed STATICFILES_DIRS.
Closes #503 and #507. Many thanks to Alexander Clausen (@sk1p) for the inspiration for the patch.
Diffstat (limited to 'debug_toolbar/panels/staticfiles.py')
-rw-r--r--debug_toolbar/panels/staticfiles.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/debug_toolbar/panels/staticfiles.py b/debug_toolbar/panels/staticfiles.py
index f212f2b..efaf841 100644
--- a/debug_toolbar/panels/staticfiles.py
+++ b/debug_toolbar/panels/staticfiles.py
@@ -163,8 +163,11 @@ class StaticFilesPanel(panels.Panel):
"""
Returns a list of paths to inspect for additional static files
"""
- dirs = getattr(settings, 'STATICFILES_DIRS', ())
- return [normpath(d) for d in dirs]
+ dirs = []
+ for finder in finders.get_finders():
+ if isinstance(finder, finders.FileSystemFinder):
+ dirs.extend(finder.locations)
+ return [(prefix, normpath(dir)) for prefix, dir in dirs]
def get_staticfiles_apps(self):
"""