chore: add read_settings templatetag

pull/73/head
Christian Merten 1 year ago
parent 8dafe01de0
commit 5205caa6a6
Signed by: christian.merten
GPG Key ID: D953D69721B948B3

@ -0,0 +1,9 @@
from django import template
from django.conf import settings
register = template.Library()
# settings value
@register.simple_tag
def settings_value(name):
return getattr(settings, name, "")

@ -1,6 +1,5 @@
{% extends "members/base.html" %} {% extends "members/base.html" %}
{% load i18n %} {% load i18n static common %}
{% load static %}
{% block title %} {% block title %}
{% trans "Registration" %} {% trans "Registration" %}
@ -12,6 +11,6 @@
<p>{% trans "Something went wrong. The registration key is invalid or has expired." %}</p> <p>{% trans "Something went wrong. The registration key is invalid or has expired." %}</p>
<p>{% trans "If you think this is a mistake, please" %} <a href="mailto:jugendreferent@jdav-hd.de">{% trans "contact us." %}</a></p> <p>{% trans "If you think this is a mistake, please" %} <a href="mailto:{% settings_value 'RESPONSIBLE_MAIL' %}">{% trans "contact us." %}</a></p>
{% endblock %} {% endblock %}

@ -1,6 +1,5 @@
{% extends "members/base.html" %} {% extends "members/base.html" %}
{% load i18n %} {% load i18n static common %}
{% load static %}
{% block title %} {% block title %}
{% trans "Echo failed" %} {% trans "Echo failed" %}
@ -12,6 +11,7 @@
<p><b>{% trans "Something went wrong. The key you supplied is" %} {{ reason }}.</b></p> <p><b>{% trans "Something went wrong. The key you supplied is" %} {{ reason }}.</b></p>
<p>{% trans "If you think this is a mistake, please" %} <a href="mailto:jugendreferent@jdav-hd.de">{% trans "contact us." %}</a></p> <p>{% trans "If you think this is a mistake, please" %}
<a href="mailto:{% settings_value 'RESPONSIBLE_MAIL' %}">{% trans "contact us." %}</a></p>
{% endblock %} {% endblock %}

@ -1,6 +1,5 @@
{% extends "members/base.html" %} {% extends "members/base.html" %}
{% load i18n %} {% load i18n static common %}
{% load static %}
{% block title %} {% block title %}
{% trans "Registration failed" %} {% trans "Registration failed" %}
@ -12,6 +11,6 @@
<p><b>{% trans "Something went wrong. The key you supplied is" %} {{ reason }}.</b></p> <p><b>{% trans "Something went wrong. The key you supplied is" %} {{ reason }}.</b></p>
<p>{% trans "If you think this is a mistake, please" %} <a href="mailto:jugendreferent@jdav-hd.de">{% trans "contact us." %}</a></p> <p>{% trans "If you think this is a mistake, please" %} <a href="mailto:{% settings_value 'RESPONSIBLE_MAIL' %}">{% trans "contact us." %}</a></p>
{% endblock %} {% endblock %}

@ -1,6 +1,5 @@
{% extends "members/base.html" %} {% extends "members/base.html" %}
{% load i18n %} {% load i18n static common %}
{% load static %}
{% block title %} {% block title %}
{% trans "Registration failed" %} {% trans "Registration failed" %}
@ -12,6 +11,7 @@
<p><b>{% trans "Something went wrong while processing your registration." %}</b></p> <p><b>{% trans "Something went wrong while processing your registration." %}</b></p>
<p>{% trans "If you think this is a mistake, please" %} <a href="mailto:jugendreferent@jdav-hd.de">{% trans "contact us." %}</a></p> <p>{% trans "If you think this is a mistake, please" %}
<a href="mailto:{% settings_value 'RESPONSIBLE_MAIL' %}">{% trans "contact us." %}</a></p>
{% endblock %} {% endblock %}

@ -1,5 +1,5 @@
{% extends "admin/index.html" %} {% extends "admin/index.html" %}
{% load i18n static %} {% load i18n static common %}
{% block content %} {% block content %}
@ -67,7 +67,7 @@ Hier siehst du alle von dir geleiteten Ausfahrten.
<table> <table>
<tr> <tr>
<td> <td>
<a href="https://nc.cloud-jdav-hd.de/">Nextcloud</a> <a href="{% settings_value 'CLOUD_LINK' %}">Nextcloud</a>
</td> </td>
<td> <td>
Hier liegen Vorlagen für Formulare und nützliche Handbücher. Hier liegen Vorlagen für Formulare und nützliche Handbücher.
@ -75,7 +75,7 @@ Hier siehst du alle von dir geleiteten Ausfahrten.
</tr> </tr>
<tr> <tr>
<td> <td>
<a href="https://dav360.de">DAV 360</a> <a href="{% settings_value 'DAV_360_LINK' %}">DAV 360</a>
</td> </td>
<td> <td>
Zugriff zu Online Office, Teams und deinem DAV Mailaccount. Zugriff zu Online Office, Teams und deinem DAV Mailaccount.
@ -83,7 +83,7 @@ Hier siehst du alle von dir geleiteten Ausfahrten.
</tr> </tr>
<tr> <tr>
<td> <td>
<a href="https://davbgs.sharepoint.com/sites/S-114-O-JDAV-Jugendreferat">Julei-Wiki</a> <a href="{% settings_value 'WIKI_LINK' %}">Julei-Wiki</a>
</td> </td>
<td> <td>
Informationen zum Jugendleiter:in-sein. Informationen zum Jugendleiter:in-sein.

Loading…
Cancel
Save