예제 #1
0
파일: __init__.py 프로젝트: nezaj/mongoose
def initialize_app(app):
    " Do any one-time initialization of the app prior to serving "
    app.static_folder = app.config['STATIC_DIR']
    assets.register_assets(app)
    DebugToolbarExtension(app)

    @app.teardown_appcontext
    def remove_session(response):  # pylint: disable=W0612
        db.session.remove()
        return response
예제 #2
0
def initialize_app(app):
    " Do any one-time initialization of the app prior to serving "
    app.static_folder = app.config['STATIC_DIR']
    initialize_db(app)
    assets.register_assets(app)