On ajoute une page de mentions légales

This commit is contained in:
Jean-Marie Favreau 2023-11-11 14:41:12 +01:00
parent 202cb29a7f
commit c1c4eac147
6 changed files with 46 additions and 5 deletions

View File

@ -211,4 +211,10 @@ msgid "Add another"
msgstr "Ajouter une autre"
msgid "Search"
msgstr "Rechercher"
msgstr "Rechercher"
msgid "Text as shown to the visitors"
msgstr "Text tel que présenté aux visiteureuses"
msgid "Content"
msgstr "Contenu"

View File

@ -0,0 +1,29 @@
{% extends "agenda_culturel/page.html" %}
{% load i18n %}
{% load static %}
{% load static_content_extra %}
{% block title %}
{{ title }}
{% endblock %}
{% block content %}
<article>
<header>
<h1>{{ title }}</h1>
</header>
{% include "agenda_culturel/static_content.html" with name=static_content url_path=url_path %}
</article>
{% endblock %}

View File

@ -74,7 +74,7 @@
<div class="grid">
<ul>
<li><a href="{% url 'view_all_tags' %}">Toutes les étiquettes</a></li>
<li>À propos</li>
<li><a href="{% url 'mentions_legales' %}">Mentions légales</a></li>
</ul>
<ul>
{% if user.is_authenticated %}

View File

@ -12,7 +12,7 @@
{% block content %}
<h1>Édition du contenu statique {{ object.name }}</h1>
<h1>Édition du contenu statique <em>{{ object.name }}</em></h1>
<form method="post">{% csrf_token %}
{{ form.as_p }}

View File

@ -28,8 +28,9 @@ urlpatterns = [
path("test_app/", include("test_app.urls")),
path("static-content/create", StaticContentCreateView.as_view(), name="create_static_content"),
path("static-content/<int:pk>/edit", StaticContentUpdateView.as_view(), name="edit_static_content"),
path('rechercher/', event_search, name='event_search'),
path('rechercher/complet/', event_search_full, name='event_search_full')
path('rechercher', event_search, name='event_search'),
path('rechercher/complet/', event_search_full, name='event_search_full'),
path('mentions-legales', mentions_legales, name='mentions_legales')
]
if settings.DEBUG:

View File

@ -229,6 +229,11 @@ class EventFilter(django_filters.FilterSet):
return len(self.form.cleaned_data["category"]) != 0 or len(self.form.cleaned_data["tags"]) != 0
def mentions_legales(request):
context = { "title": "Mentions légales", "static_content": "mentions_legales", "url_path": reverse_lazy("mentions_legales") }
return render(request, 'agenda_culturel/page-single.html', context)
def home(request):
return week_view(request, home=True)