From ec8f941dc9f633a86cbc8309f0c1716dca7eae9c Mon Sep 17 00:00:00 2001 From: Benni Baermann Date: Mon, 19 Oct 2020 09:31:38 +0200 Subject: [PATCH] new conditional in mails --- input/templates/input/if_mail.txt | 13 +++++++++++-- input/views.py | 1 + 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/input/templates/input/if_mail.txt b/input/templates/input/if_mail.txt index 057ad62..08e3d5a 100644 --- a/input/templates/input/if_mail.txt +++ b/input/templates/input/if_mail.txt @@ -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: diff --git a/input/views.py b/input/views.py index 48d5dfa..9c98999 100644 --- a/input/views.py +++ b/input/views.py @@ -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']