hooks.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:kolibri 作者: learningequality 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号