def initialize_extensions(app): """Helper functions""" api.init_app(app) db.init_app(app) mail.init_app(app) migrate.init_app(app, db, directory='migrations') jwt.init_app(app)
def configure_extensions(app, cli): """configure flask extensions """ db.init_app(app) jwt.init_app(app) if cli is True: migrate.init_app(app, db)
def register_extensions(app): """Register Flask extensions.""" # Register database and models with app.app_context(): db.init_app(app) migrate.init_app(app, db) # Register JWT helper jwt.init_app(app)
def initialize_extensions(app): """Helper functions""" api.init_app(app) db.init_app(app) jwt.init_app(app) mail.init_app(app) migrate.init_app(app, db, directory="migrations") @jwt.token_in_blacklist_loader def check_if_token_in_blacklist(decrypted_token): """Checking if token is blacklisted""" jti = decrypted_token["jti"] return JWTToken.is_jti_blacklisted(jti)
def register_extensions(app: Flask): """Register Flask extensions.""" # Register database and models with app.app_context(): db.init_app(app) migrate.init_app(app, db) # Register JWT token auth jwt.init_app(app) # Registering application encryption bcrypt.init_app(app)