0

I have added the following settings in my Project

DEBUG_TOOLBAR_PATCH_SETTINGS = False

INTERNAL_IPS = ('127.0.0.1', )

MIDDLEWARE_CLASSES = (
    'debug_toolbar.middleware.DebugToolbarMiddleware',...)
INSTALLED_APPS = (...,
                  'debug_toolbar',)

urlpatterns += patterns('',
        url(r'^__debug__/', include(debug_toolbar.urls)),
    )

Toolbar loads on project root url and admin but doesn't load on app urls.

Conans
  • 461
  • 1
  • 4
  • 14

1 Answers1

0

normally you only need to add Django Debug Toolbar to your apps

INSTALLED_APPS = (
    'debug_toolbar',
)

for troublesome installations in your settings file

DEBUG_TOOLBAR_PATCH_SETTINGS = False

MIDDLEWARE_CLASSES = (
    ...
    'debug_toolbar.middleware.DebugToolbarMiddleware', 
    ...
)

Note that the order of where the 'debug_toolbar.middleware.DebugToolbarMiddleware' import sits is important

then in your urls.py

if settings.DEBUG: # make sure the toolbar is above ?CKeditor and FeinCMS
    import debug_toolbar
    urlpatterns += patterns('',
        url(r'^__debug__/', include(debug_toolbar.urls)),
    )

note that the debug urls include should be down towards the bottom of your urls file, but not necessarily at the end. It should be below your apps but above some 3rd party apps.

So you might need to play around with the positioning of the import position both in MIDDLEWARE_CLASSES and in urls.py

lukeaus
  • 11,465
  • 7
  • 50
  • 60