first logic in mail template tested

This commit is contained in:
Benni Baermann 2020-10-08 10:21:11 +02:00
parent ae82a26ba8
commit 8ad0f91c85
2 changed files with 8 additions and 2 deletions

View file

@ -1 +1,7 @@
hello {{realname}} hello {{data.realname}}
<p>
{% if data.choice == 'IFG' %}
IFG detected
{% else %}
no IFG detected
{% endif %}

View file

@ -91,7 +91,7 @@ class ExternView(CookieWizardView):
# we need to send the following mails here: # we need to send the following mails here:
# - mail with entered data to the Volunteer # - mail with entered data to the Volunteer
mail_template = get_template('input/ifg_volunteer_mail.txt') mail_template = get_template('input/ifg_volunteer_mail.txt')
context = { 'realname': data['realname'] } context = { 'data': data }
send_mail( send_mail(
'form filled', 'form filled',
mail_template.render(context), mail_template.render(context),