Skip to content

Commit 5748f9b

Browse files
committed
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>
1 parent 005b426 commit 5748f9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

debug_toolbar/panels/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def title(self):
3030
def process_response(self, request, response):
3131
versions = {}
3232
versions['Python'] = '%d.%d.%d' % sys.version_info[:3]
33-
for app in settings.INSTALLED_APPS + ['django']:
33+
for app in list(settings.INSTALLED_APPS) + ['django']:
3434
name = app.split('.')[-1].replace('_', ' ').capitalize()
3535
__import__(app)
3636
app = sys.modules[app]

0 commit comments

Comments
 (0)