From 2ed391ce2c851bcf5795caa64c6389d4b3d1cbf4 Mon Sep 17 00:00:00 2001 From: Francesco Filicetti Date: Wed, 25 Mar 2020 09:09:42 +0100 Subject: [PATCH] error pages --- .../templates/404.html | 15 ++++--- .../templates/500.html | 15 ++++--- .../templates/error-page.html | 41 +++++++++++++++++++ setup.py | 2 +- 4 files changed, 60 insertions(+), 13 deletions(-) create mode 100644 django_unical_bootstrap_italia/templates/error-page.html diff --git a/django_unical_bootstrap_italia/templates/404.html b/django_unical_bootstrap_italia/templates/404.html index 31d13c2..5a0f118 100644 --- a/django_unical_bootstrap_italia/templates/404.html +++ b/django_unical_bootstrap_italia/templates/404.html @@ -1,8 +1,11 @@ -{% extends 'base-setup.html' %} +{% extends 'error-page.html' %} + {% load i18n %} -{% block centered_container %} -

{% trans "Error 404" %}

-

{% trans "Page or Resource not found 404" %}

- -{% endblock centered_container %} +{% block error_type %} + {% trans "Error 404" %} +{% endblock error_type %} + +{% block error_description %} + {% trans "Page or Resource not found 404" %} +{% endblock error_description %} diff --git a/django_unical_bootstrap_italia/templates/500.html b/django_unical_bootstrap_italia/templates/500.html index 1407653..08d59b5 100644 --- a/django_unical_bootstrap_italia/templates/500.html +++ b/django_unical_bootstrap_italia/templates/500.html @@ -1,8 +1,11 @@ -{% extends 'base-setup.html' %} +{% extends 'error-page.html' %} + {% load i18n %} -{% block centered_container %} -

{% trans "Internal Error 500" %}

-

{% trans "This service has encourrend and unexpected error" %}

- -{% endblock centered_container %} +{% block error_type %} + {% trans "Internal Error 500" %} +{% endblock error_type %} + +{% block error_description %} + {% trans "This service has encourrend and unexpected error" %} +{% endblock error_description %} diff --git a/django_unical_bootstrap_italia/templates/error-page.html b/django_unical_bootstrap_italia/templates/error-page.html new file mode 100644 index 0000000..aa22264 --- /dev/null +++ b/django_unical_bootstrap_italia/templates/error-page.html @@ -0,0 +1,41 @@ +{% extends 'base-setup.html' %} + +{% load i18n %} +{% load static %} + +{% block header_slim_right_zone %}{% endblock header_slim_right_zone %} + +{% block menu_links %} + {% block menu_pre_buttons %} + {% endblock menu_pre_buttons %} + + {% block menu_post_buttons %} + {% endblock menu_post_buttons %} +{% endblock menu_links %} + +{% block centered_container %} +
+
+ + + + {% block error_type %} + {% trans "Error" %} + {% endblock error_type %}
+

+ {% block error_description %} + {% trans "Error description" %} + {% endblock error_description %} +


+ + {% trans "Home" %} + +

+
+{% endblock centered_container %} diff --git a/setup.py b/setup.py index 9a4ac14..f303b84 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ setup( name='django-unical-bootstrap-italia', - version='1.0.1', + version='1.0.2', packages=find_packages(), include_package_data=True, license='BSD License',