def bundle(self):
"""
:returns: a generator yielding dict objects with properties of the built
asset, most notably its URL.
"""
for f in self._stats_file_content["files"]:
filename = f['name']
if any(list(regex.match(filename) for regex in settings.IGNORE_PATTERNS)):
continue
relpath = '{0}/{1}'.format(self.unique_slug, filename)
if django_settings.DEBUG:
f['url'] = f['publicPath']
else:
f['url'] = staticfiles_storage.url(relpath)
yield f
评论列表
文章目录