Updated docstring on make_response
This commit is contained in:
parent
9070c5c325
commit
8340d3c9f5
1 changed files with 7 additions and 0 deletions
|
|
@ -145,6 +145,13 @@ def make_response(*args):
|
|||
|
||||
response = make_response(render_template('not_found.html'), 404)
|
||||
|
||||
The other use case of this function is to force the return value of a
|
||||
view function into a response which is helpful with view
|
||||
decorators::
|
||||
|
||||
response = make_response(view_function())
|
||||
response.headers['X-Parachutes'] = 'parachutes are cool'
|
||||
|
||||
Internally this function does the following things:
|
||||
|
||||
- if no arguments are passed, it creates a new response argument
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue