Browse Source

new conditional in mails

master
Benni Baermann 4 years ago
parent
commit
ec8f941dc9
2 changed files with 12 additions and 2 deletions
  1. +11
    -2
      input/templates/input/if_mail.txt
  2. +1
    -0
      input/views.py

+ 11
- 2
input/templates/input/if_mail.txt 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 %} {% comment %}
alte mail: alte mail:

+ 1
- 0
input/views.py View File

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

Loading…
Cancel
Save