在flask 的 design 有幾個 concept。
Context (應用下上文) 就是其中一個例子。
The context is typically used to cache resources on there that need to be created on a per-request or usage case. For instance database connects are destined to go there.
应用上下文 — Flask 0.10.1 文档
http://docs.torriacg.org/docs/flask/appcontext.html?highlight=%E5%BA%94%E7%94%A8%E4%B8%8A%E4%B8%8B%E6%96%87
Introduction into Contexts — Flask-SQLAlchemy 0.16 documentation
http://pythonhosted.org/Flask-SQLAlchemy/contexts.html
- Dec 17 Tue 2013 11:50
-
[python][flask] Context 應用上下文


請先 登入 以發表留言。