From cca139b32d0b536f8fed9badbf16318a1d8c6832 Mon Sep 17 00:00:00 2001 From: Dorian Lesbre <dorian.lesbre@gmail.com> Date: Mon, 26 Apr 2021 13:08:22 +0200 Subject: [PATCH] Added custom titles to error pages --- home/templates/400.html | 2 ++ home/templates/403.html | 2 ++ home/templates/404.html | 2 ++ home/templates/500.html | 2 ++ home/templates/base.html | 2 +- 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/home/templates/400.html b/home/templates/400.html index 74eaf30..ec0c026 100644 --- a/home/templates/400.html +++ b/home/templates/400.html @@ -1,5 +1,7 @@ {% extends "base.html" %} +{% block title %}400 Invalid{% endblock %} + {% block "content" %} <h2>Requête invalide</h2> <p>Votre requête au serveur est invalide et n'a donc pas pu être traitée.</p> diff --git a/home/templates/403.html b/home/templates/403.html index 10605fc..faa73b1 100644 --- a/home/templates/403.html +++ b/home/templates/403.html @@ -1,5 +1,7 @@ {% extends "base.html" %} +{% block title %}403 Forbidden{% endblock %} + {% block "content" %} <h2>Accès refusé</h2> <p>Vous n'avez pas la permission pour consulter cette page.</p> diff --git a/home/templates/404.html b/home/templates/404.html index 4204ae4..c89b1a8 100644 --- a/home/templates/404.html +++ b/home/templates/404.html @@ -1,5 +1,7 @@ {% extends "base.html" %} +{% block title %}404 Not Found{% endblock %} + {% block "content" %} <h2>Page introuvable</h2> <p>La page que vous avez demandée n'existe plus ou n'a jamais existé.</p> diff --git a/home/templates/500.html b/home/templates/500.html index 3586704..28d1cd6 100644 --- a/home/templates/500.html +++ b/home/templates/500.html @@ -1,5 +1,7 @@ {% extends "base.html" %} +{% block title %}500 Internal Error{% endblock %} + {% block "content" %} <h2>Erreur interne</h2> <p>Un incident technique est survenu pendant l'affichage de cette page.</p> diff --git a/home/templates/base.html b/home/templates/base.html index a7ee04e..3ace02f 100644 --- a/home/templates/base.html +++ b/home/templates/base.html @@ -7,7 +7,7 @@ <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <title>Interludes{% if settings.date_start %} {{ settings.date_start.year }}{% endif %}</title> + <title>{% block title %}Interludes{% if settings.date_start %} {{ settings.date_start.year }}{% endif %}{% endblock %}</title> <meta name="description" content="Inscriptions et infos sur les interENS ludiques{% if settings.date_start %}, édition {{ settings.date_start.year }}{% endif %}"> <meta name="keywords" content="Interludes ENS événement COF {% if settings.date_start %}{{ settings.date_start.year }} {% endif %}InterENS"> <link rel="icon" type="image/png" href="{% static 'imgs/favicon.ico' %}"> -- GitLab