Browse Source

Update 4.4.3 HTTP Methods Example

Otherwise it produces `ValueError: View function did not return a response`.
pull/2175/head
Swan Htet Aung 8 years ago committed by GitHub
parent
commit
f84fdadda9
  1. 4
      docs/quickstart.rst

4
docs/quickstart.rst

@ -306,9 +306,9 @@ can be changed by providing the ``methods`` argument to the
@app.route('/login', methods=['GET', 'POST']) @app.route('/login', methods=['GET', 'POST'])
def login(): def login():
if request.method == 'POST': if request.method == 'POST':
do_the_login() return do_the_login()
else: else:
show_the_login_form() return show_the_login_form()
If ``GET`` is present, ``HEAD`` will be added automatically for you. You If ``GET`` is present, ``HEAD`` will be added automatically for you. You
don't have to deal with that. It will also make sure that ``HEAD`` requests don't have to deal with that. It will also make sure that ``HEAD`` requests

Loading…
Cancel
Save