Skip to content

Fix use of DjangoDebugToolbar

Guillaume Bernard requested to merge (removed):fix_django_toolbar into master

I noticed a few bugs when trying to enable the DjangoDebugToolbar.

  • the first was related to a missing debug_toolbar.middleware.DebugToolbarMiddleware in MIDDLEWARE_CLASSES, which is now fixed. Reading the instructions given by the maintainers of the project, I saw:

You should include the Debug Toolbar middleware as early as possible in the list.

Which justifies the insert(0, x) instead of append(x).

  • the second is the error NoReverseMatch at / 'djdt' is not a registered namespace, which is corrected by adding a url in urlpatterns.
Edited by Guillaume Bernard

Merge request reports