Change config loading.
This commit is contained in:
parent
50887b49cd
commit
ffcc8843a4
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user