def register_extensions(app): from flask.ext.turbolinks import turbolinks from everbean.core import db, celery, assets from everbean.core import mail, limiter db.init_app(app) cache.init_app(app) celery.config_from_object(app.config) login_manager.init_app(app) mail.init_app(app) turbolinks(app) assets.init_app(app) limiter.init_app(app) if app.config['USE_SERVER_SIDE_SESSION']: from flask.ext.session import Session Session(app) if app.debug: # load debug toobar from flask.ext.debugtoolbar import DebugToolbarExtension # disable redirection interception of Flask-DebugToobar app.config['DEBUG_TB_INTERCEPT_REDIRECTS'] = False DebugToolbarExtension(app)
def register_extensions(app): db.init_app(app) assets.init_app(app) mail.init_app(app) turbolinks(app) cache.init_app(app) if app.debug: from flask_debugtoolbar import DebugToolbarExtension DebugToolbarExtension(app)
def register_extensions(app): db.init_app(app) assets.init_app(app) mail.init_app(app) turbolinks(app) cache.init_app(app) api_manager.init_app(app, flask_sqlalchemy_db=db) if app.debug: from flask_debugtoolbar import DebugToolbarExtension DebugToolbarExtension(app)