Django-debug-toolbar: ImportError: No module named debug_toolbar.urls

Created on 18 Jan 2017  路  1Comment  路  Source: jazzband/django-debug-toolbar

from django.conf import settings
#...
if settings.DEBUG:
    urlpatterns += [url(r'^__debug__/', include(debug_toolbar.urls)), #`NameError: name 'debug_toolbar' is not defined`

My settings are divided between production and local, which I think is the problem:

from .base import *

try:
    # this file will only exists on the production server
    from .production_settings import *
except:
    from .local import *

And in local.py:

INSTALLED_APPS += (
    # https://django-debug-toolbar.readthedocs.io/en/1.4/
    'debug_toolbar',
)

How can I get this to work? Thanks!

Most helpful comment

ugh... import debug_toolbar =)

>All comments

ugh... import debug_toolbar =)

Was this page helpful?
0 / 5 - 0 ratings