Skip to content

Commit

Permalink
error pages
Browse files Browse the repository at this point in the history
  • Loading branch information
francesco-filicetti committed Mar 25, 2020
1 parent d84e8e0 commit 2ed391c
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 13 deletions.
15 changes: 9 additions & 6 deletions django_unical_bootstrap_italia/templates/404.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{% extends 'base-setup.html' %}
{% extends 'error-page.html' %}

{% load i18n %}

{% block centered_container %}
<h4>{% trans "Error 404" %}</h4>
<p>{% trans "Page or Resource not found 404" %}</p>
</div>
{% 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 %}
15 changes: 9 additions & 6 deletions django_unical_bootstrap_italia/templates/500.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{% extends 'base-setup.html' %}
{% extends 'error-page.html' %}

{% load i18n %}

{% block centered_container %}
<h4>{% trans "Internal Error 500" %}</h4>
<p>{% trans "This service has encourrend and unexpected error" %}</p>
</div>
{% 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 %}
41 changes: 41 additions & 0 deletions django_unical_bootstrap_italia/templates/error-page.html
Original file line number Diff line number Diff line change
@@ -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 %}
<li class="nav-item">
<a class="nav-link"
href="/">
<span>{% trans "Home" %}</span>
</a>
</li>
{% block menu_post_buttons %}
{% endblock menu_post_buttons %}
{% endblock menu_links %}

{% block centered_container %}
<div class="callout danger mt-5">
<div class="callout-title">
<svg class="icon icon-primary icon-danger">
<use xlink:href="{% static 'svg/sprite.svg' %}#it-close-circle"></use>
</svg>
{% block error_type %}
{% trans "Error" %}
{% endblock error_type %}</div>
<p>
{% block error_description %}
{% trans "Error description" %}
{% endblock error_description %}
<hr>
<a role="button" class="btn btn-outline-secondary"
href="/">
{% trans "Home" %}
</a>
</p>
</div>
{% endblock centered_container %}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 2ed391c

Please sign in to comment.