Django Debug toolbar appears, but the panels return 404

It worked in the last couple of days, but now all the links on the toolbar 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 installed it explicitly like this: http://django-debug-toolbar.readthedocs.org/en/1.0/installation.html#explicit-setup

I am not getting the problem with the djdt namespace actually, I am not getting any errors except 404 when I try to view one of the panels .....

+4
source share
2 answers

Turns out the problem was a proxy server. Since I am working with angular for parts of this project, grunt serves the angular stuff and proxies the django stuff.

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

/__debug__ - grunt, DjDT .

0

:

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

URL- . :

urlpatterns += patterns(...)

URL-, django-cms ..

, debug_toolbar urlpatterns = patterns('', url...) + urlpatterns.

+10

Source: https://habr.com/ru/post/1533858/


All Articles