Closed ni8mr closed 9 years ago
Hello, in the book, the 404 error handling process is defined like this-
@app.errorhandler(404) def internal_error(error): return render_template('404.html'), 404
Is it necessary to write a 404 after render_template('404.html')? The function has worked without it-
@app.errorhandler(404) def internal_error(error): return render_template('404.html')
It is at 281 page of the book.
Hi - It will work without the 404 on the end, but you def. want to add it on since that defines the actual status code.
http://flask.pocoo.org/docs/0.10/quickstart/#about-responses
Thank you!
Hello, in the book, the 404 error handling process is defined like this-
Is it necessary to write a 404 after render_template('404.html')? The function has worked without it-
It is at 281 page of the book.