Another doc improvement

This commit is contained in:
Armin Ronacher 2010-04-11 03:53:38 +02:00
parent d78b04a3fc
commit 6a3a046f55

View file

@ -534,7 +534,11 @@ you want to customize the error page, you can use the
@app.errorhandler(404) @app.errorhandler(404)
def page_not_found(error): 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: .. _sessions: