Skip to content

Commit

Permalink
Add nice HTTP error pages
Browse files Browse the repository at this point in the history
  • Loading branch information
OdyX committed Aug 17, 2021
1 parent b7c6291 commit 976027e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions defivelo/templates/403.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{% extends "http_errors.html" %}
{% load i18n %}
{% block head_title %}403 {% trans "Accès interdit" %}{% endblock %}
{% block http_error_code %}403{% endblock %}
{% block http_error_name %}{% trans "Accès interdit" %}{% endblock %}
5 changes: 5 additions & 0 deletions defivelo/templates/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{% extends "http_errors.html" %}
{% load i18n %}
{% block head_title %}404 {% trans "Pas trouvé" %}{% endblock %}
{% block http_error_code %}404{% endblock %}
{% block http_error_name %}{% trans "Pas trouvé" %}{% endblock %}
5 changes: 5 additions & 0 deletions defivelo/templates/500.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{% extends "http_errors.html" %}
{% load i18n %}
{% block head_title %}500 {% trans "Erreur interne du serveur" %}{% endblock %}
{% block http_error_code %}500{% endblock %}
{% block http_error_name %}{% trans "Erreur interne du serveur" %}{% endblock %}
6 changes: 6 additions & 0 deletions defivelo/templates/http_errors.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% extends "base.html" %}
{% block content %}
<div class="alert alert-danger" role="alert">
<strong>{% block http_error_name %}{% endblock %}</strong>
</div>
{% endblock %}

0 comments on commit 976027e

Please sign in to comment.