python框架之flask 请求上下文和应用程序上下文自动和手动推送的原理(flask的核心机制)
flask常见的一个错误:(超出上下文的权限错误)
RuntimeError: Working outside of request context.
This typically means that you attempted to use functionality that
needed an active HTTP request. Consult the documentation on testing
for information about how to avoid this problem.
请求上下文的官方解说:http://flask.pocoo.org/docs/1.0/reqcontext/
应用程序上下文的官方解说:http://flask.pocoo.org/docs/1.0/appcontext/
flask上下文管理的核心机制图:(requests请求上下文和app应用程序上下文原理)