def register_extensions(app): """Register Flask extensions.""" bcrypt.init_app(app) cache.init_app(app) db.init_app(app) csrf_protect.init_app(app) login_manager.init_app(app) # debug_toolbar.init_app(app) migrate.init_app(app, db) flask_static_digest.init_app(app) return None
def register_extensions(app): """Register Flask extensions.""" assets.init_app(app) bcrypt.init_app(app) cache.init_app(app) db.init_app(app) csrf_protect.init_app(app) login_manager.init_app(app) debug_toolbar.init_app(app) migrate.init_app(app, db) return None
def register_extensions(app): """Register Flask extensions.""" bcrypt.init_app(app) cache.init_app(app) db.init_app(app) csrf_protect.init_app(app) login_manager.init_app(app) debug_toolbar.init_app(app) migrate.init_app(app, db) redis_store.init_app(app) # rbac.init_app(app) principal.init_app(app) return None
def register_extensions(app): """Register Flask extensions.""" bcrypt.init_app(app) cache.init_app(app) db.app = app db.init_app(app) csrf_protect.init_app(app) login_manager.init_app(app) debug_toolbar.init_app(app) migrate.init_app(app, db) # redis_store.init_app(app) # db.app = app register_api_blueprints(app) apiManager.init_app(app) rbac.init_app(app) # principal.init_app(app) bootstrap.init_app(app) return None
def register_extensions(app): """Register Flask extensions.""" bcrypt.init_app(app) cache.init_app(app) db.init_app(app) csrf_protect.init_app(app) login_manager.init_app(app) debug_toolbar.init_app(app) migrate.init_app(app, db) bootstrap.init_app(app) #添加rest_ful_api try: from main import api as v_api except Exception as e: return {'success':False,'message':'api接口操作失败。'},401 api.init_app(app) return None