From 0ee92d54c325843125cff1aea7714e521277a9c0 Mon Sep 17 00:00:00 2001 From: "pierre-francois.duc" Date: Fri, 1 Nov 2024 20:57:26 +0100 Subject: [PATCH] Split about into about and contact --- app/epa/urls.py | 3 +- app/epa/views.py | 5 +++ app/templates/base.html | 3 +- app/templates/legal/about.html | 58 +++++++++++++++++++++++++++----- app/templates/legal/contact.html | 53 +++++++++++++++++++++++++++++ 5 files changed, 112 insertions(+), 10 deletions(-) create mode 100644 app/templates/legal/contact.html diff --git a/app/epa/urls.py b/app/epa/urls.py index 7c1c6a86d..6ed8865c7 100644 --- a/app/epa/urls.py +++ b/app/epa/urls.py @@ -18,7 +18,7 @@ from django.urls import path, re_path, include from django.contrib.staticfiles.urls import staticfiles_urlpatterns -from .views import imprint, privacy, about, license +from .views import imprint, privacy, about, license, contact urlpatterns = ( i18n_patterns( @@ -30,6 +30,7 @@ path("imprint/", imprint, name="imprint"), path("privacy/", privacy, name="privacy"), path("about/", about, name="about"), + path("contact/", contact, name="contact"), path("license/", license, name="license"), ) + [re_path(r"^i18n/", include("django.conf.urls.i18n"))] diff --git a/app/epa/views.py b/app/epa/views.py index caa0f758e..4ed1c4309 100644 --- a/app/epa/views.py +++ b/app/epa/views.py @@ -21,6 +21,11 @@ def about(request): return render(request, "legal/about.html") +@require_http_methods(["GET"]) +def contact(request): + return render(request, "legal/contact.html") + + @require_http_methods(["GET"]) def license(request): return render(request, "legal/license.html") diff --git a/app/templates/base.html b/app/templates/base.html index f8ad3f7f9..4c7d535f5 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -86,7 +86,8 @@