Merge pull request #3113 from greyli/improve-doc-quickstart

doc: Improve description for valid view func return value
This commit is contained in:
David Lord 2019-03-06 05:40:22 -08:00 committed by GitHub
commit 5cb4b73167
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.