Пример #1
0
def register_extensions(app):
    bootstrap.init_app(app)
    db.init_app(app)
    login_manager.init_app(app)
    csrf.init_app(app)
    ckeditor.init_app(app)
    mail.init_app(app)
    moment.init_app(app)

    migrate.init_app(app, db)
Пример #2
0
def register_extensions(app):
    bootstrap.init_app(app)
    db.init_app(app)
    moment.init_app(app)
    ckeditor.init_app(app)
    login.init_app(app)
    csrf.init_app(app)
    migrate.init_app(app)

    return app
Пример #3
0
def register_extensions(app):
    bootstrap.init_app(app)
    db.init_app(app)
    moment.init_app(app)
    ckeditor.init_app(app)
    login.init_app(app)
    csrf.init_app(app)
    if not hasattr(app, 'extensions'):
        app.extensions = {}
    app.extensions['csrf'] = csrf
    migrate.init_app(app)

    return app