From f84fdadda9f675a3e94a042790e010be07927af4 Mon Sep 17 00:00:00 2001 From: Swan Htet Aung Date: Thu, 9 Feb 2017 18:01:12 +0630 Subject: [PATCH] Update 4.4.3 HTTP Methods Example Otherwise it produces `ValueError: View function did not return a response`. --- docs/quickstart.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/quickstart.rst b/docs/quickstart.rst index 749a1f75..b619185d 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -306,9 +306,9 @@ can be changed by providing the ``methods`` argument to the @app.route('/login', methods=['GET', 'POST']) def login(): if request.method == 'POST': - do_the_login() + return do_the_login() else: - show_the_login_form() + return show_the_login_form() 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