mirror of
https://github.com/django/django.git
synced 2025-10-23 16:52:46 +00:00
Fixed #18986 -- Improved error message for missing files
in CachedStaticFilesStorage. Thanks zyegfryed for his work on the patch.
This commit is contained in:
parent
f7f69cf7dd
commit
90fe9141de
4 changed files with 27 additions and 2 deletions
|
|
@ -251,7 +251,10 @@ class CachedFilesMixin(object):
|
|||
for patterns in self._patterns.values():
|
||||
for pattern, template in patterns:
|
||||
converter = self.url_converter(name, template)
|
||||
content = pattern.sub(converter, content)
|
||||
try:
|
||||
content = pattern.sub(converter, content)
|
||||
except ValueError as exc:
|
||||
yield name, None, exc
|
||||
if hashed_file_exists:
|
||||
self.delete(hashed_name)
|
||||
# then save the processed result
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue