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.
|
returned from the view.
|
||||||
2. If it's a string, a response object is created with that data and the
|
2. If it's a string, a response object is created with that data and the
|
||||||
default parameters.
|
default parameters.
|
||||||
3. If a tuple is returned the items in the tuple can provide extra
|
3. If a tuple is returned the items in the tuple can provide extra information.
|
||||||
information. Such tuples have to be in the form ``(response, status,
|
Such tuples have to be in the form ``(response, status, headers)``,
|
||||||
headers)`` or ``(response, headers)`` where at least one item has
|
``(response, headers)`` or ``(response, status)`` where at least one item
|
||||||
to be in the tuple. The ``status`` value will override the status code
|
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.
|
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
|
4. If none of that works, Flask will assume the return value is a
|
||||||
valid WSGI application and convert that into a response object.
|
valid WSGI application and convert that into a response object.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue