Change config loading.

This commit is contained in:
Alexis Lahouze 2015-11-27 12:21:13 +01:00
parent 50887b49cd
commit ffcc8843a4
2 changed files with 2 additions and 7 deletions

View File

@ -21,18 +21,13 @@ from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.bower import Bower
from flask.ext.assets import Environment, Bundle
from . import config
# The app
app = Flask(__name__, static_folder=None)
app.config['SQLALCHEMY_DATABASE_URI'] = config.db_uri
app.config['SQLALCHEMY_ECHO'] = app.debug
app.config['WTF_CSRF_ENABLED'] = False
app.config['SECRET_KEY'] = 'my_secret_key'
app.config.from_pyfile('config.cfg')
app.debug = config.debug
db = SQLAlchemy(app)
@ -46,7 +41,7 @@ app.register_blueprint(api, url_prefix='/api')
app.config['BOWER_COMPONENTS_ROOT'] = "../bower_components"
app.config['BOWER_TRY_MINIFIED'] = not config.debug
app.config['BOWER_TRY_MINIFIED'] = not app.debug
bower = Bower(app)