Esempio n. 1
0
def register_extensions(app: Flask):
    """
    注册第三方插件
    :param app: Flask 核心对象
    :return: None
    """
    db.init_app(app)
    migrate.init_app(app, db)
Esempio n. 2
0
def register_extensions(app: Flask):
    """
    注册第三方插件
    :param app: Flask 核心对象
    :return: None
    """
    db.init_app(app)
    migrate.init_app(app, db)
    login_manager = get_login_manager()
    login_manager.init_app(app)
Esempio n. 3
0
def register_extensions(app):
    db.init_app(app)
    moment.init_app(app)
    bootstrap.init_app(app)
    mail.init_app(app)
    ckeditor.init_app(app)
    whooshee.init_app(app)
    login_manager.init_app(app)
    csrf.init_app(app)
    migrate.init_app(app, db)
    debug_toolbar.init_app(app)
Esempio n. 4
0
def register_extensions(app):
    """
    注册第三方插件
    """
    db.init_app(app)
    migrate.init_app(app, db)
    csrf_protect.init_app(app)
    # 获取 login_manager 并调用 init_app 方法将其注册到 Flask 核心对象上
    login_manager = get_login_manager()
    login_manager.init_app(app)
    mail.init_app(app)
    whooshee.init_app(app)