Exemple #1
0
def register_extensions(app):
    """Register Flask extensions."""
    bcrypt.init_app(app)
    cache.init_app(app)
    db.init_app(app)
    migrate.init_app(app, db)
    jwt.init_app(app)
Exemple #2
0
def register_extensions(app):
    """Register Flask extensions."""
    origins = app.config.get('CORS_ORIGIN_WHITELIST', '*')
    cors.init_app(app, resources={r"/api/*": {"origins": origins}})
    bcrypt.init_app(app)
    cache.init_app(app)
    db.init_app(app)
    migrate.init_app(app, db)
    jwt.init_app(app)
    docs.init_app(app)
    api.init_app(app)
Exemple #3
0
def register_extensions(app):
    from src.extensions import db
    from src.extensions import migrate
    from src.extensions import socketio
    from src.extensions import limiter
    db.init_app(app)
    migrate.init_app(app, db)
    socketio.init_app(app,
                      cors_allowed_origins='*',
                      ping_timeout=1000,
                      ping_interval=50)
    limiter.init_app(app)
Exemple #4
0
def register_extensions(app):
    """Flask extensions."""
    bcrypt.init_app(app)
    db.init_app(app)
    migrate.init_app(app, db)
    admin.init_app(app)
Exemple #5
0
def register_extensions(app):
    db.init_app(app)
    migrate.init_app(app, db)
    ma.init_app(app)