From 6a3a046f55755f0691568431e68a8bfea8d89df0 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Sun, 11 Apr 2010 03:53:38 +0200 Subject: [PATCH] Another doc improvement --- docs/quickstart.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/quickstart.rst b/docs/quickstart.rst index de8ce039..38e37f26 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -534,7 +534,11 @@ you want to customize the error page, you can use the @app.errorhandler(404) def page_not_found(error): - return render_template('page_not_found.html') + return render_template('page_not_found.html'), 404 + +Note the ``404`` after the :func:`~flask.render_template` call. This +tells Flask that the status code of that page should be 404 which means +not found. By default 200 is assumed which translats to: all went well. .. _sessions: