aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lamb2011-11-30 17:22:03 +0000
committerChris Lamb2011-11-30 17:22:03 +0000
commit5748f9b3e110b5f3621242f9fc262a4619e23d15 (patch)
tree0865f77dad2608b893d8ee0c85f348955a7d8340
parent005b42612444a444cb5d0a6c9caad5dfd18ca011 (diff)
downloaddjango-debug-toolbar-5748f9b3e110b5f3621242f9fc262a4619e23d15.tar.bz2
Don't blow up if INSTALLED_APPS is a tuple
Since r17158 in Django trunk, INSTALLED_APPS is now not always co-erced to a list. In my projects I prefer to have INSTALLED_APPS as a tuple as it reinforces that it is not modifiable at runtime. However, this blows up in the VersionDebugPanel as it currently assumes it is a list. Signed-off-by: Chris Lamb <lamby@debian.org>
-rw-r--r--debug_toolbar/panels/version.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/debug_toolbar/panels/version.py b/debug_toolbar/panels/version.py
index 4e58971..8ac0e82 100644
--- a/debug_toolbar/panels/version.py
+++ b/debug_toolbar/panels/version.py
@@ -30,7 +30,7 @@ class VersionDebugPanel(DebugPanel):
def process_response(self, request, response):
versions = {}
versions['Python'] = '%d.%d.%d' % sys.version_info[:3]
- for app in settings.INSTALLED_APPS + ['django']:
+ for app in list(settings.INSTALLED_APPS) + ['django']:
name = app.split('.')[-1].replace('_', ' ').capitalize()
__import__(app)
app = sys.modules[app]