Search code examples
pythondjangodjango-debug-toolbardjango-1.9

Django debug toolbar installation (Django 1.9)


I'm using python 3.5.1 with django 1.9.4 in virtualenv (Windows). I'm trying to add the django-debug-toolbar but I get an error when starting the server.

I added 'django_debug' in my installed_apps, and also 'debug_toolbar.middleware.DebugToolbarMiddleware' in my middleware_classes.

Pip freeze log:

Django==1.9.4
django-debug-toolbar==1.4
sqlparse==0.1.19

Runserver:

ImportError: No module named 'django_debug'


Solution

  • First install django-debug-toolbar by doing:

     pip3 install django-debug-toolbar (pip3 since you're using python3),
    

    And next in your INSTALLED_APPS add:

    'debug_toolbar'
    

    and not django_debug, and also remove the middleware you added(not sure of it, as I never added it).