__init__.py 文件源码

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

项目:veripress 作者: veripress 项目源码 文件源码
def send_static_file(self, filename):
        """
        Send static files from the static folder in the current selected theme prior to the global static folder.

        :param filename: static filename
        :return: response object
        """
        if self.config['MODE'] == 'api-only':
            abort(404)  # if 'api-only' mode is set, we should not send static files

        theme_static_folder = getattr(self, 'theme_static_folder', None)
        if theme_static_folder:
            try:
                return send_from_directory(theme_static_folder, filename)
            except NotFound:
                pass
        return super(CustomFlask, self).send_static_file(filename)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号