django-debug-toolbar通过相对路径寻找资产? [英] django-debug-toolbar looking for assets by relative path?

查看:126
本文介绍了django-debug-toolbar通过相对路径寻找资产?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让django-debug工具栏工作,在遵循所有说明之后,我收到以下错误:

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

HTML源代码相对于这些东西。

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>

但是,我的STATIC_URL设置为 / static / 在项目的settings.py文件中。我在这里配置错误?

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

推荐答案

我手动应用了修补程序提供的这里,它为我做了一个伎俩。

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

这篇关于django-debug-toolbar通过相对路径寻找资产?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆