django-debug-toolbar looking for assets by relative path?

徘徊边缘 提交于 2019-12-19 09:05:08

问题


I'm trying to get django-debug-toolbar to work, and after following all the instructions, I'm getting these errors:

[05/Sep/2012 15:33:35] "GET /profile/edit/ HTTP/1.1" 200 43647
[05/Sep/2012 15:33:36] "GET /profile/edit/debug_toolbar/css/toolbar.min.css HTTP/1.1" 404 86163
[05/Sep/2012 15:33:36] "GET /profile/edit/debug_toolbar/css/toolbar.min.js HTTP/1.1" 404 66260

The HTML source is calling these things relative.

When I grep through the debug-toolbar sources, I see these two lines line:

debug_toolbar/templates/debug_toolbar/base.html:5:<link rel="stylesheet" href="{{ STATIC_URL }}debug_toolbar/css/toolbar.min.css" type="text/css">
debug_toolbar/templates/debug_toolbar/base.html:6:<script type="text/javascript" src="{{ STATIC_URL }}debug_toolbar/css/toolbar.min.js"></script>

However, my STATIC_URL is set to /static/ in the settings.py file for the project. Did I misconfigure something here?


回答1:


I manually applied bugfixes provided here and it did a trick for me.



来源:https://stackoverflow.com/questions/12289349/django-debug-toolbar-looking-for-assets-by-relative-path

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!