问题
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