feat: Add privacy statement, terms of service and imprint to about

This commit is contained in:
moanos [he/him] 2024-04-14 14:03:18 +02:00
parent a6e2bbc3e5
commit 223c9f2f9b
2 changed files with 23 additions and 1 deletions

View File

@ -1,7 +1,22 @@
{% extends "fellchensammlung/base_generic.html" %}
{% load i18n %}
{% load custom_tags %}
{% block content %}
<h1>{% translate "Regeln" %}</h1>
{% include "fellchensammlung/lists/list-rules.html" %}
{% if privacy_statement %}
<h1>{{ privacy_statement.title }}</h1>
<p>{{ privacy.content | render_markdown }}</p>
{% endif %}
{% if terms_of_service %}
<h1>{{ terms_of_service.title }}</h1>
<p>{{ terms_of_service.content | render_markdown }}</p>
{% endif %}
{% if imprint %}
<h1>{{ imprint.title }}</h1>
<p>{{ imprint.content | render_markdown }}</p>
{% endif %}
{% endblock %}

View File

@ -111,8 +111,15 @@ def about(request):
imprint = Text.objects.get(text_code="imprint", language=lang)
except Text.DoesNotExist:
imprint = None
try:
privacy_statement = Text.objects.get(text_code="privacy_statement", language=lang)
except Text.DoesNotExist:
privacy_statement = None
context = {"rules": rules, "terms_of_service": terms_of_service, "imprint": imprint}
context = {"rules": rules,
"terms_of_service": terms_of_service,
"imprint": imprint,
"privacy_statement": privacy_statement}
return render(
request,
"fellchensammlung/about.html",