예제 #1
0
def register_extensions(app):
    db.init_app(app)
    bootstrap.init_app(app)
    moment.init_app(app)
    login_manager.init_app(app)
    ckeditor.init_app(app)
    csrf.init_app(app)
예제 #2
0
def register_extensions(app):
    bootstrap.init_app(app)  # 扩展的实例化和初始化
    db.init_app(app)
    migrate.init_app(app, db)
    moment.init_app(app)
    ckeditor.init_app(app)
    mail.init_app(app)
    login_manager.init_app(app)
    csrf.init_app(app)
예제 #3
0
파일: __init__.py 프로젝트: xue000/Blog
def register_extensions(app):

    bootstrap.init_app(app)
    db.init_app(app)
    login_manager.init_app(app)
    # mail.init_app(app)
    moment.init_app(app)
    # whooshee.init_app(app)
    csrf.init_app(app)
    migrate.init_app(app, db)
예제 #4
0
def register_extensions(app):
    bootstrap.init_app(app)
    db.init_app(app)
    login_manager.init_app(app)
    mail.init_app(app)
    dropzone.init_app(app)
    moment.init_app(app)
    whooshee.init_app(app)
    avatars.init_app(app)
    csrf.init_app(app)
    ckeditor.init_app(app)
예제 #5
0
파일: __init__.py 프로젝트: cyy2427/Blog
def configure_extensions(app):

    db.init_app(app)
    migrate.init_app(app, db)
    lm.init_app(app)
    bootstrap.init_app(app)
    ckeditor.init_app(app)
    configure_uploads(app, icon)
    register_error_handlers(app)
    sentry_sdk.init(dsn=SENTRY_DSN,
                    integrations=[FlaskIntegration()])

    @lm.user_loader
    def load_user(user_id):
        return User.query.get(int(user_id))
예제 #6
0
def register_extensions(app):
    db.init_app(app)
    bootstrap.init_app(app)
예제 #7
0
def bootstrap_app(app):
    bootstrap.init_app(app)