settings.py
INSTALLED_APPS = (
'debug_toolbar',
)
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'debug_toolbar.middleware.DebugToolbarMiddleware',
)
urls.py
if DEBUG:
import debug_toolbar
urlpatterns += url('__debug__/', include('debug_toolbar.urls'))
requirements.txt
Django
django-debug-toolbar==3.1.1
its showing No module named 'debug_toolbar.urls' when testing on the server.
You are using an ancient version of Django Debug Toolbar. The
urlsmodule was added in v3.2.3. Install the latest version and it will work. You can also remove the direct module import (import debug_toolbar) since it is no longer required.