Updated documentation. Starting to look pretty good

This commit is contained in:
Armin Ronacher 2010-04-09 01:32:39 +02:00
parent 3b36bef2e6
commit 4aa76212d1
6 changed files with 359 additions and 4 deletions

View file

@ -68,6 +68,10 @@ Incoming Request Data
it also has a :meth:`~werkzeug.FileStorage.save` function that can
store the file on the filesystem.
.. attribute:: environ
The underlying WSGI environment.
.. attribute:: method
The current request method (``POST``, ``GET`` etc.)
@ -136,6 +140,22 @@ To access the current session you can use the :class:`session` object:
session.modified = True
Application Globals
-------------------
To share data that is valid for one request only from one function to
another, a global variable is not good enough because it would break in
threaded environments. Flask provides you with a special object that
ensures it is only valid for the active request and that will return
different values for each request. In a nutshell: it does the right
thing, like it does for :class:`request` and :class:`session`.
.. data:: g
Just store on this whatever you want. For example a database
connection or the user that is currently logged in.
Useful Functions and Classes
----------------------------