Fix Python – django-debug-toolbar not showing up


Asked By – AlexBrand

I looked at other questions and can’t figure it out…

I did the following to install django-debug-toolbar:

  1. pip install django-debug-toolbar
  2. added to middleware classes:
    # Uncomment the next line for simple clickjacking protection:
    # 'django.middleware.clickjacking.XFrameOptionsMiddleware',



4 Added debug_toolbar to installed apps

I am not getting any errors or anything, and the toolbar doesn’t show up on any page, not even admin.

I even added the directory of the debug_toolbar templates to my TEMPLATE_DIRS

Now we will see solution for issue: django-debug-toolbar not showing up


What is DEBUG set to? It won’t load unless it’s True.

If it’s still not working, try adding ‘’ to INTERNAL_IPS as well.


This is a last-ditch-effort move, you shouldn’t have to do this, but it will clearly show if there’s merely some configuration issue or whether there’s some larger issue.

Add the following to

def show_toolbar(request):
    return True

That will effectively remove all checks by debug toolbar to determine if it should or should not load itself; it will always just load. Only leave that in for testing purposes, if you forget and launch with it, all your visitors will get to see your debug toolbar too.

For explicit configuration, also see the official install docs here.


Apparently the syntax for the nuclear option has changed. It’s now in its own dictionary:

def show_toolbar(request):
    return True
    "SHOW_TOOLBAR_CALLBACK" : show_toolbar,

Their tests use this dictionary.

This question is answered By – Chris Pratt

This answer is collected from stackoverflow and reviewed by FixPython community admins, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0