July 2019
Beginner to intermediate
302 pages
9h 38m
English
It is also possible to create custom errors as per the application requirements and bind them to error codes and custom error screens. This can be done as follows:
class MyCustom404(Exception):
pass
@app.errorhandler(MyCustom404)
def special_page_not_found(error):
return render_template("errors/custom_404.html"), 404