django-debug-toolbar/django-debug-toolbar — Issue #243: DDT breaks when resolve()'ing on middlewares
Author: andres-torres-marroquin
Created: 2011-12-29 17:03:29+00:00
State: open

I have a Middleware that is trying to resolve "/__debug__/m/js/toolbar.min.js" (the current request.path) url which is not defined in urls.py, so it throws a Resolver404 exception which inherits from Http404, so "/__debug__/m/js/toolbar.min.js" (request.path) can't be dispatched.

I have created a project that reproduces the error:
https://github.com/andres-torres-marroquin/django-debug-toolbar-issue-project/tree/master/ddt_issue

The Middleware breaking DDT is: https://github.com/andres-torres-marroquin/django-debug-toolbar-issue-project/blob/master/ddt_issue/main/middleware.py

A possible solution is adding django-debug-toolbar urls manually to the project instead the current automagically way.

Best regards. Thanks for the hard work.