def assets(self, app):
bundles = {
'home_js': Bundle(
'bootstrap/js/jquery.min.js',
'bootstrap/bootstrap/js/bootstrap.min.js',
output='assets/home.js',
filters='jsmin'),
'home_css': Bundle(
'bootstrap/bootstrap/css/bootstrap.min.css',
'bootstrap/css/honmaple.css',
output='assets/home.css',
filters='cssmin')
}
if self.use_auth:
auth_js = ('bootstrap/js/honmaple.js', 'bootstrap/js/login.js')
bundles['home_js'].contents = bundles['home_js'].contents + auth_js
if self.css:
bundles['home_css'].contents = bundles[
'home_css'].contents + self.css
if self.js:
bundles['home_js'].contents = bundles['home_js'].contents + self.js
assets = Environment(app)
assets.register(bundles)
评论列表
文章目录