forked from orbit-oss/flask
Another doc improvement
This commit is contained in:
parent
d78b04a3fc
commit
6a3a046f55
1 changed files with 5 additions and 1 deletions
|
|
@ -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:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue