Jum*_*oke 9 django heroku whitenoise
我正在尝试在 Heroku 上部署我的应用程序。之前上传成功,但是我做了一些更改并尝试重新上传,但此后一直没有响应。我不断收到此错误:whitenoise.storage.MissingFileError:无法使用 找到文件“ecommerce/fonts/icofont.eot”。对此我能做什么?
这是回溯:
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
Run Code Online (Sandbox Code Playgroud)
我的 settings.py 文件中有这个
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
STATIC_URL = '/static/'
Run Code Online (Sandbox Code Playgroud)
Isi*_*oro 14
虽然来晚了,但我希望这能帮助遇到这个问题的人,至少作为临时解决方案:
使用
STATICFILES_STORAGE = 'whitenoise.storage.CompressedStaticFilesStorage'
Run Code Online (Sandbox Code Playgroud)
这禁用了 django 缓存机制,似乎有效。即使有这个错误也发生在我身上WHITENOISE_MANIFEST_STRICT = False
http://whitenoise.evans.io/en/stable/django.html
| 归档时间: |
|
| 查看次数: |
3816 次 |
| 最近记录: |