forked from orbit-oss/flask
Merge pull request #3113 from greyli/improve-doc-quickstart
doc: Improve description for valid view func return value
This commit is contained in:
commit
5cb4b73167
1 changed files with 4 additions and 4 deletions
|
|
@ -683,10 +683,10 @@ converting return values into response objects is as follows:
|
|||
returned from the view.
|
||||
2. If it's a string, a response object is created with that data and the
|
||||
default parameters.
|
||||
3. If a tuple is returned the items in the tuple can provide extra
|
||||
information. Such tuples have to be in the form ``(response, status,
|
||||
headers)`` or ``(response, headers)`` where at least one item has
|
||||
to be in the tuple. The ``status`` value will override the status code
|
||||
3. If a tuple is returned the items in the tuple can provide extra information.
|
||||
Such tuples have to be in the form ``(response, status, headers)``,
|
||||
``(response, headers)`` or ``(response, status)`` where at least one item
|
||||
has to be in the tuple. The ``status`` value will override the status code
|
||||
and ``headers`` can be a list or dictionary of additional header values.
|
||||
4. If none of that works, Flask will assume the return value is a
|
||||
valid WSGI application and convert that into a response object.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue