5

It was working in the last couple of days, but now all the links on the toolbar themselves are just #

<li class="djDebugPanelButton active">
<input type="checkbox" data-cookie="djdtSQLPanel" checked="checked" title="Disable for next and successive requests">
    <a href="#" title="SQL queries from 1 connection" class="SQLPanel">SQL<br><small>215 queries in 174.10ms</small></a>
</li>

I've set it up explicitly like this says: http://django-debug-toolbar.readthedocs.org/en/1.0/installation.html#explicit-setup

I don't get the djdt namespace issue in fact I get no errors at all, except the 404 when I try to view one of the panels.....

boatcoder
  • 17,525
  • 18
  • 114
  • 178

2 Answers2

14

Placing:

if settings.DEBUG:
    import debug_toolbar
    urlpatterns = patterns(
        '',
        url(r'^__debug__/', include(debug_toolbar.urls)),)

before all other URLs did the trick for me. Then:

urlpatterns += patterns(...)

for the rest of the URLs, like django-cms, etc.

Or if you prefer to place debug_toolbar implementation at the end of the file urlpatterns = patterns('', url...) + urlpatterns.

nerdfiles
  • 1
  • 2
  • 10
1

Turns out the problem was the grunt proxy. Since i'm working with angular for parts of this project, grunt was serving up the angular stuff and proxying the django stuff.

proxies: [{
    context: ['/api', '/ngforms', '/account', '/static', '/admin', '/__debug__'],
    host: '<%= yeoman.pyhost %>',
    port: '<%= yeoman.pyport %>'
}],

I had to add the /__debug__ context to the grunt proxy so that DjDT could actually see the request to respond.

boatcoder
  • 17,525
  • 18
  • 114
  • 178