遇到这种情况多半是用了
path('favicon.ico', serve, {'path': 'img/fav.ico'}),
这样本地生效,远程不生效。 解决办法是在 base.html 中 header 间添加一行
<link rel="shortcut icon" href="{% static 'img/fav.ico' %}">