feat: add FAQ section to about

This commit is contained in:
moanos [he/him] 2024-12-24 09:05:11 +01:00
parent 44cf2936d1
commit 9fffbffdb7
2 changed files with 10 additions and 1 deletions

View File

@ -17,6 +17,15 @@
<h2>{% translate "Regeln" %}</h2> <h2>{% translate "Regeln" %}</h2>
{% include "fellchensammlung/lists/list-rules.html" %} {% include "fellchensammlung/lists/list-rules.html" %}
{% if faq %}
<div class="card">
<h2>{{ faq.title }}</h2>
<p>
{{ faq.content | render_markdown }}
</p>
</div>
{% endif %}
{% if privacy_statement %} {% if privacy_statement %}
<div class="card"> <div class="card">
<h2>{{ privacy_statement.title }}</h2> <h2>{{ privacy_statement.title }}</h2>

View File

@ -359,7 +359,7 @@ def about(request):
lang = Language.objects.get(languagecode=language_code) lang = Language.objects.get(languagecode=language_code)
legal = {} legal = {}
for text_code in ["terms_of_service", "privacy_statement", "imprint", "about_us"]: for text_code in ["terms_of_service", "privacy_statement", "imprint", "about_us", "faq"]:
try: try:
legal[text_code] = Text.objects.get(text_code=text_code, language=lang, ) legal[text_code] = Text.objects.get(text_code=text_code, language=lang, )
except Text.DoesNotExist: except Text.DoesNotExist: