mnogoznal_web_assets.py 文件源码

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

项目:mnogoznal 作者: nlpub 项目源码 文件源码
def init(app=None):
    app = app or Flask(__name__)

    with app.app_context():
        env = Environment(app)
        env.load_path = [path.join(path.dirname(__file__), 'assets')]
        env.url = app.static_url_path
        env.directory = app.static_folder
        env.auto_build = app.debug
        env.manifest = 'file'

        scss = Bundle('stylesheet.scss', filters='pyscss', output='stylesheet.css')
        env.register('scss_all', scss)

        bundles = [scss]
        return bundles
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号