django - 部署时网站图标不显示
问题描述
我在 Pythonanywhere 上部署了一个 Django 网站。favicon 在我的本地服务器上工作,但不在我的 Pythonanywhere 站点上。
我的 base.html 中的代码是
<link rel="stylesheet" type="text/css" href="{% static 'fixtureapp/style.css' %}">
<link href="{% static 'images/scc.ico?' %}" rel="icon" type="image/x-icon" />
我已经展示了样式表链接,因为它正在工作,所以静态设置好了。iamges/scc.ico 在同一个静态文件中。
我得到错误
2021-03-10 14:52:43,422:未找到:/favicon.ico
解决方案
推荐阅读
- node.js - 如何在 Dockerfile 中编译 typescript
- c# - 应用内购买问题。当前不存在名称“DependencyService”
- vba - 如何删除Word表格单元格的回车结束?
- ios - Swift - 使用 Realm 存储分页数据的好方法?
- log4net - EventLogAppender:有问题的“修复”属性
- javascript - 为 Google Charts 条形图数据解析 Json
- java - 在 Flink 中从 Kafka 聚合数据的问题
- r - 密度热图计算
- ios - 月份标题没有在左侧 FSCALENDAR 上移动
- c++ - GCC 产生隐藏的删除操作符调用,尽管构造函数被标记为 noexcept