new conditional in mails

This commit is contained in:
Benni Baermann 2020-10-19 09:31:38 +02:00
parent 2b86efaa67
commit ec8f941dc9
2 changed files with 12 additions and 2 deletions

View file

@ -1,6 +1,15 @@
Hallo IF,
Hallo Team Ideenförderung,
es gab einen neuen Antrag von {{data.realname}}.
Username {{data.username}} fragt ein
{% if data.library %} Literaturstipendium {% endif %}
{% if data.url %} IFG {% endif %}
an.
Genehmigen: INSERT Link here
Ablehnen: INSERT Link here
es gab einen neuen Antrag von {{data.realname}}
{% comment %}
alte mail:

View file

@ -81,6 +81,7 @@ class ExternView(CookieWizardView):
# write data to database
form = form.save(commit=False)
# we have to copy the data from the first form here
# this is ugly code. how can we copy this without explicit writing?
# i found no way to access the ModelForm.Meta.exclude-tupel
form.realname = data['realname']