aboutsummaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2021-06-04 22:32:49 +0530
committerNavan Chauhan <navanchauhan@gmail.com>2021-06-04 22:32:49 +0530
commitf6904b4c12af044eeceab81011ba45f01da42070 (patch)
tree6f4a56ae1ee805ec33ccea6e35baa037a2ec0be7 /app/views
parent4ee8a532909fc97918e727f2f78988867e6e4117 (diff)
added 403 page and test
Diffstat (limited to 'app/views')
-rw-r--r--app/views/error_pages.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/views/error_pages.py b/app/views/error_pages.py
index 108e91e..5d995fc 100644
--- a/app/views/error_pages.py
+++ b/app/views/error_pages.py
@@ -5,6 +5,10 @@ from flask import render_template
def simulate_500():
return 500
+@app.errorhandler(403)
+def page_forbidden(e):
+ return render_template("message.html",code=403,message="Forbidden. You shall not pass"), 403
+
@app.errorhandler(404)
def page_not_found(e):
return render_template('message.html',code=404,message="Whoops! Page Not Found"), 404