ZINNIA_MEDIA_URL 未定义或无法在 django 上识别
嗨,我一直在尝试使用百日草,尽管如此,CSS 并没有很好地应用,因为它找不到(或者它是空白的)一个名为 ZINNIA_MEDIA_URL 的设置变量
<link rel="shortcut icon" href="{{ ZINNIA_MEDIA_URL }}img/favicon.ico" />
我尝试设置自己,但没有任何运气。有人遇到过这个问题吗?
谢谢
Hi I've been trying to play around with zinnia, nevertheless the CSS is not well applied because it cannot find (or it's in blank) a setting variable called ZINNIA_MEDIA_URL
<link rel="shortcut icon" href="{{ ZINNIA_MEDIA_URL }}img/favicon.ico" />
I tried to setted my self, but without any luck. Has anyone encouter this problem?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我快速浏览了一下,在当前版本的 zinnia 中找不到任何对 ZINNIA_MEDIA_URL 的引用。
我在自述文件中发现了一条注释,zinnia 现在使用 Django 1.3 staticfiles 应用程序来处理其 css/javascript 媒体。看看 https://github.com /Fantomas42/django-blog-zinnia/blob/master/zinnia/templates/zinnia/sculpture.html 你会看到“{{ STATIC_URL }}”在那里。
那么也许您从旧示例或旧版本的文档中获取了 ZINNIA_MEDIA_URL ?或者您升级到了较新的百日草版本?
I took a quick look and I cannot find any reference to ZINNIA_MEDIA_URL in the current version of zinnia.
I did find a note in the readme that zinnia uses Django's 1.3 staticfiles app to handle its css/javascript media now. Look at https://github.com/Fantomas42/django-blog-zinnia/blob/master/zinnia/templates/zinnia/skeleton.html and you'll see "{{ STATIC_URL }}" in there.
So perhaps you took the ZINNIA_MEDIA_URL from an older example or older version of the docs? Or you upgraded to a newer zinnia version?