示例#1
0
def register_extensions(app):
    """Register Flask extensions."""
    bcrypt.init_app(app)
    cache.init_app(app)
    db.init_app(app)
    cors.init_app(app)
    login_manager.init_app(app)
    migrate.init_app(app, db)
    rd.init_app(app)
    celery.conf.update(app.config)
示例#2
0
def create_app():
    app = Flask(__name__)
    app.config.from_object(config)
    sql.init_app(app)
    ma.init_app(app)
    bcrypt.init_app(app)
    jwt.init_app(app)

    app.register_blueprint(routes.api_bp)

    return app
示例#3
0
def register_extensions(app):
    """Register Flask extensions"""

    bcrypt.init_app(app)
    cache.init_app(app)
示例#4
0
def register_extensions(app):
    """Register Flask extensions"""

    bcrypt.init_app(app)
    cache.init_app(app)