0

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'

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
Popa Andrei
  • 318
  • 1
  • 7
  • 15

2 Answers2

2

You have to add debug_toolbar in INSTALLED_APPS and not django_debug.

Also, you can remove the class that you added in MIDDLEWARE_CLASSES. As given in the docs:

If MIDDLEWARE_CLASSES doesn’t contain the middleware, the Debug Toolbar automatically adds it the beginning of the list.

You can have a look at the docs.

JRodDynamite
  • 12,325
  • 5
  • 43
  • 63
1

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).

  • Hi, thank you for spotting that 'debug_toolbar' error. I don't know why I typed it like that. That was the clear deal breaker :) Thank you for your reply, it's now working! – Popa Andrei Mar 29 '16 at 10:41