From 388bd295732e8537313716ad9eab1522204987b4 Mon Sep 17 00:00:00 2001 From: mst Date: Mon, 16 Dec 2024 16:50:24 +0300 Subject: [PATCH] add error templates --- templates/errors/404.html | 4 ++++ templates/errors/500.html | 4 ++++ templates/errors/502.html | 4 ++++ templates/errors/base.html | 9 +++++++++ 4 files changed, 21 insertions(+) create mode 100644 templates/errors/404.html create mode 100644 templates/errors/500.html create mode 100644 templates/errors/502.html create mode 100644 templates/errors/base.html diff --git a/templates/errors/404.html b/templates/errors/404.html new file mode 100644 index 0000000..10ebc7a --- /dev/null +++ b/templates/errors/404.html @@ -0,0 +1,4 @@ +{% extends 'errors/base.html' %} +{% set error_code = '404' %} +{% set error_title = 'Not Found' %} +{% set error_description = 'The requested resource could not be found.' %} diff --git a/templates/errors/500.html b/templates/errors/500.html new file mode 100644 index 0000000..d7132e7 --- /dev/null +++ b/templates/errors/500.html @@ -0,0 +1,4 @@ +{% extends 'errors/base.html' %} +{% set error_code = '500' %} +{% set error_title = 'Internal Server Error' %} +{% set error_description = 'The server was unable to complete your request. Please try again later. If this problem persists, please contact the admin of this {} instance.'.format(const.appName) %} diff --git a/templates/errors/502.html b/templates/errors/502.html new file mode 100644 index 0000000..db4181b --- /dev/null +++ b/templates/errors/502.html @@ -0,0 +1,4 @@ +{% extends 'errors/base.html' %} +{% set error_code = '502' %} +{% set error_title = 'Bad Gateway' %} +{% set error_description = 'The server was unable to complete your request. Please try again later. If this problem persists, please contact the admin of this {} instance.'.format(const.appName) %} diff --git a/templates/errors/base.html b/templates/errors/base.html new file mode 100644 index 0000000..d300d19 --- /dev/null +++ b/templates/errors/base.html @@ -0,0 +1,9 @@ +{% extends 'base.html' %} +{% block title %}{{ error_title }}{% endblock %} +{% block content %} +
+

{{ error_code }}

+

{{ error_title }}

+

{{ error_description }}

Home

+
+{% endblock %}