我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用flask._app_ctx_stack()。
def configure_app(app, archive, debug): app.debug = debug if app.debug: print("WARNING: DEBUG MODE IS ENABLED!") app.config["PROPAGATE_EXCEPTIONS"] = True path = extract_archive(archive) user_data = get_users(path) channel_data = get_channels(path) channels = compile_channels(path, user_data, channel_data) top = flask._app_ctx_stack top.channels = channels