flask.g is now on the app context and not the request context

This commit is contained in:
Armin Ronacher 2012-12-21 11:45:42 +01:00
parent 61d43c7f12
commit 1949c4a9ab
9 changed files with 71 additions and 20 deletions

View file

@ -258,6 +258,10 @@ thing, like it does for :class:`request` and :class:`session`.
Just store on this whatever you want. For example a database
connection or the user that is currently logged in.
Starting with Flask 0.10 this is stored on the application context and
no longer on the request context which means it becomes available if
only the application context is bound and not yet a request.
This is a proxy. See :ref:`notes-on-proxies` for more information.