From 673765cb75b93b75b2568c7717faa5859854a3c7 Mon Sep 17 00:00:00 2001 From: kelepirci Date: Sun, 7 Aug 2016 02:39:02 +0300 Subject: [PATCH] Custom 403 Page Added custom 403 page. Change-Id:Id5ccb3835748c9a627a4a27b9332abf1f45a1648 --- dash/main/errors.py | 4 ++++ dash/templates/403.html | 13 +++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 dash/templates/403.html diff --git a/dash/main/errors.py b/dash/main/errors.py index f77b540..88709ac 100644 --- a/dash/main/errors.py +++ b/dash/main/errors.py @@ -5,6 +5,10 @@ from . import main def page_not_found(e): return render_template('404.html'), 404 +@main.app_errorhandler(403) +def internal_server_error(e): + return render_template('403.html'), 403 + @main.app_errorhandler(500) def internal_server_error(e): return render_template('500.html'), 500 \ No newline at end of file diff --git a/dash/templates/403.html b/dash/templates/403.html new file mode 100644 index 0000000..cc85b65 --- /dev/null +++ b/dash/templates/403.html @@ -0,0 +1,13 @@ +{% extends "adminlte/base_without_nav.html" %} + +{% block title %}403 ERROR{% endblock %} +{% block description %}dash-stack - Permission Error{% endblock %} +{% block bodytag %}login-page{% endblock %} + +{% block body %} + + + +{% endblock %} \ No newline at end of file