From eb734d27164d626dd034b8eaaf96e542616d934f Mon Sep 17 00:00:00 2001 From: moanos Date: Thu, 7 Nov 2024 07:58:17 +0100 Subject: [PATCH] feat: Add about_us text --- README.md | 1 + src/fellchensammlung/templates/fellchensammlung/about.html | 5 +++++ src/fellchensammlung/views.py | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fd6a534..c8c6a66 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,7 @@ Therefore, a solution is used where a number of predefined texts per site are su | `privacy_statement` | About | | `terms_of_service` | About | | `imprint` | About | +| `about_us` | About | | Any rule | About | # Developer Notes diff --git a/src/fellchensammlung/templates/fellchensammlung/about.html b/src/fellchensammlung/templates/fellchensammlung/about.html index 54f0ecf..76af90f 100644 --- a/src/fellchensammlung/templates/fellchensammlung/about.html +++ b/src/fellchensammlung/templates/fellchensammlung/about.html @@ -5,6 +5,11 @@ {% block title %}{% translate "Über uns und Regeln" %}{% endblock %} {% block content %} + {% if about_us %} +

{{ about_us.title }}

+ {{ about_us.content | render_markdown }} + {% endif %} +

{% translate "Regeln" %}

{% include "fellchensammlung/lists/list-rules.html" %} diff --git a/src/fellchensammlung/views.py b/src/fellchensammlung/views.py index 86a60f7..2eee058 100644 --- a/src/fellchensammlung/views.py +++ b/src/fellchensammlung/views.py @@ -340,7 +340,7 @@ def about(request): lang = Language.objects.get(languagecode=language_code) legal = {} - for text_code in ["terms_of_service", "privacy_statement", "imprint"]: + for text_code in ["terms_of_service", "privacy_statement", "imprint", "about_us"]: try: legal[text_code] = Text.objects.get(text_code=text_code, language=lang, ) except Text.DoesNotExist: