首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >whitenoise.storage.MissingFileError:文件“ecommerce/fonts/icofon.eot”

whitenoise.storage.MissingFileError:文件“ecommerce/fonts/icofon.eot”
EN

Stack Overflow用户
提问于 2020-04-15 16:46:24
回答 1查看 2.1K关注 0票数 8

我正在尝试在Heroku上部署我的应用程序。它是成功上传之前,然而,我做了一些改变,我尝试重新上传,但它一直没有回应,从那时起。我一直收到这个错误:whitenoise.storage.MissingFileError:文件‘ecommerce/fonts/icofon.eot’找不到。,我能做些什么呢?

这是回溯:

代码语言:javascript
复制
whitenoise.storage.MissingFileError: The file 'ecommerce/fonts/icofont.eot' could not be found with <whitenoise.storage.CompressedManifestStaticFilesStorage object at 0x7f73c4861320>.
remote:        The CSS file 'ecommerce/css/icofont.css' references a file which could not be found:
remote:          ecommerce/fonts/icofont.eot
remote:        Please check the URL references in this CSS file, particularly any
remote:        relative paths which might be pointing to the wrong location.
remote:        Sentry is attempting to send 0 pending error messages
remote:        Waiting up to 2 seconds
remote:        Press Ctrl-C to quit

我把这个放在我的settings.py文件里

代码语言:javascript
复制
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
STATIC_URL = '/static/'
EN

回答 1

Stack Overflow用户

发布于 2021-09-09 19:44:40

这件事来得很晚,但我希望这能帮助那些遇到这一问题的人,至少作为一个暂时的解决办法:

使用

代码语言:javascript
复制
STATICFILES_STORAGE = 'whitenoise.storage.CompressedStaticFilesStorage'

它禁用django缓存机制,似乎已经工作了。即使在WHITENOISE_MANIFEST_STRICT = False上,这个错误也发生在我身上。

http://whitenoise.evans.io/en/stable/django.html

票数 10
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61234135

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档