diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2021-06-04 00:48:02 +0530 |
---|---|---|
committer | Navan Chauhan <navanchauhan@gmail.com> | 2021-06-04 00:48:02 +0530 |
commit | 9560196c029183c673a14928e4061f5078260c5d (patch) | |
tree | 99a46f85b88af4a145f8bfe6fa45afd5a3db211f /app | |
parent | 063b7dffebfaaa99bca9bc1ec9e3293cb33188b4 (diff) |
handled 404 and 500
Diffstat (limited to 'app')
-rw-r--r-- | app/views/error_pages.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/views/error_pages.py b/app/views/error_pages.py new file mode 100644 index 0000000..b0db7f7 --- /dev/null +++ b/app/views/error_pages.py @@ -0,0 +1,10 @@ +from app import app +from flask import render_template + +@app.errorhandler(404) +def page_not_found(e): + return render_template('message.html',code=404,message="Whoops! Page Not Found"), 404 + +@app.errorhandler(500) +def page_server_error(e): + return render_template("message.html",code=500,message="Server Could Not Process This."), 500
\ No newline at end of file |