Commit 8477146c by Ned Batchelder

Merge pull request #9189 from edx/ned/fix-django-debug-toolbar-settings

We should only add the DjDT urls if it is enabled.
parents 009e8a10 8476baf4
......@@ -190,6 +190,7 @@ if settings.DEBUG:
except ImportError:
pass
if 'debug_toolbar' in settings.INSTALLED_APPS:
import debug_toolbar
urlpatterns += (
url(r'^__debug__/', include(debug_toolbar.urls)),
......
......@@ -708,6 +708,7 @@ if settings.DEBUG:
# in debug mode, allow any template to be rendered (most useful for UX reference templates)
urlpatterns += url(r'^template/(?P<template>.+)$', 'debug.views.show_reference_template'),
if 'debug_toolbar' in settings.INSTALLED_APPS:
import debug_toolbar
urlpatterns += (
url(r'^__debug__/', include(debug_toolbar.urls)),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment