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 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): db.init_app(app) migrate.init_app(app, db) mail.init_app(app) avatars.init_app(app) limiter.init_app(app)
def register_extensions(app): mail.init_app(app) cors.init_app(app) return None