Move assets in frontend.

This commit is contained in:
Alexis Lahouze
2016-01-13 00:10:51 +01:00
parent 1db40c80b6
commit 76205812a0
2 changed files with 17 additions and 12 deletions

View File

@ -1,4 +1,5 @@
from flask import Blueprint, render_template
from flask.ext.assets import Environment, Bundle
blueprint = Blueprint(
@ -8,12 +9,19 @@ blueprint = Blueprint(
static_folder='static'
)
frontend_js = Bundle('frontend/js/app.js', 'frontend/js/accounts.js',
'frontend/js/operations.js', 'frontend/js/scheduler.js')
# Local asset management
frontend_js = Bundle(
'frontend/js/app.js',
'frontend/js/accounts.js',
'frontend/js/operations.js',
'frontend/js/scheduler.js'
)
frontend_css = Bundle('frontend/css/main.css')
assets = Environment()
assets.register('frontend_js', frontend_js)
assets.register('frontend_css', frontend_css)
@blueprint.route('/', defaults={'path': 'accounts'})
@blueprint.route('/<path:path>')