TemplateSyntaxError: Caught ValueError while rendering: The file 'img/logo.png' could not be found with <staticfiles.storage.CachedStaticFilesStorage object at 0x7f296d7fa250>.
zyegfryed opened this issue · comments
Hi,
I'm experiencing some errors when using django-staticfiles with CachedStaticFilesStorage storage.
After delving into the source code, it looks like that when a cache key is evicted from the cache, the CachedFilesMixin.url
method - called by the static
template tag - is having hard time to regenerate it, since it does not provide the content of the targeted file when calling CachedFilesMixin.hashed_name
.
I'll try to provide a patch to fix this issue.
Regards.
Forget about it. The issue is somewhere else.
The CachedFilesMixin.hashed_name
test that file exists first before raising an exception. There should be some issue in my configuration for some obscure reason.
I'm closing this ticket and will re-open it in case it's relevant.