From 7d2d21deb872969b87e24eb18afc556b7d1f8e22 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Wed, 29 Jul 2015 15:14:44 +0200 Subject: [PATCH] Use flask-bower. --- accountant/__init__.py | 10 +++++- accountant/frontend/templates/layout.html | 44 +++++++++++++++++++---- 2 files changed, 47 insertions(+), 7 deletions(-) diff --git a/accountant/__init__.py b/accountant/__init__.py index d1f2a11..6bafa5c 100644 --- a/accountant/__init__.py +++ b/accountant/__init__.py @@ -20,6 +20,7 @@ import logging from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy +from flask.ext.bower import Bower from . import config @@ -72,5 +73,12 @@ def session_aware(f): from .api import api from .frontend import frontend -app.register_blueprint(frontend, url_prefix='') +app.register_blueprint(frontend, url_prefix='/app') app.register_blueprint(api, url_prefix='/api') + + +app.config['BOWER_COMPONENTS_ROOT'] = "../bower_components" +app.config['BOWER_TRY_MINIFIED'] = not config.debug + + +bower = Bower(app) diff --git a/accountant/frontend/templates/layout.html b/accountant/frontend/templates/layout.html index df59a4a..d6d0b2f 100644 --- a/accountant/frontend/templates/layout.html +++ b/accountant/frontend/templates/layout.html @@ -23,17 +23,49 @@ - - + + + + + + + + + + + + + + + + + + + + + - - + + - - + + + + + + + + + + + + + + +