Python flask 模块,_app_ctx_stack() 实例源码

我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用flask._app_ctx_stack()

项目:slack-export-viewer    作者:hfaran    | 项目源码 | 文件源码
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