use a single template for all mails.
This commit is contained in:
parent
f6b4f0584b
commit
02fddf6cc3
|
@ -1,7 +1,10 @@
|
||||||
|
# sender mail adress
|
||||||
EVA_MAIL = 'benni.baermann@wikimedia.de'
|
EVA_MAIL = 'benni.baermann@wikimedia.de'
|
||||||
|
|
||||||
|
# these Fields should be included in every mail
|
||||||
BASIC_DATA = ['firstname', 'lastname']
|
BASIC_DATA = ['firstname', 'lastname']
|
||||||
|
|
||||||
|
# for every department: 'MAIL' => mail adress, 'DATA': additional fields to include
|
||||||
MAILS = {'IT': {
|
MAILS = {'IT': {
|
||||||
'MAIL': 'it@wikimedia.de',
|
'MAIL': 'it@wikimedia.de',
|
||||||
'DATA': ['laptop', 'os',],
|
'DATA': ['laptop', 'os',],
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
{% include 'evapp/dataloop.txt' %}
|
|
|
@ -1 +0,0 @@
|
||||||
{% include 'evapp/dataloop.txt' %}
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
Hallo!
|
||||||
|
|
||||||
|
Es gibt einen Neuzugang bei Wikimedia! Hier (<insertlink>) kannst Du nachsehen,
|
||||||
|
welche Schritte jetzt für Deine Abteilung nötig werden. Im Folgenden alle Daten,
|
||||||
|
die Du dafür brauchst:
|
||||||
|
|
||||||
|
{% include 'evapp/dataloop.txt' %}
|
||||||
|
|
||||||
|
Grüße, Deine E.V.A.
|
|
@ -63,7 +63,7 @@ class EvaFormView(CookieWizardView):
|
||||||
context = {'data': self.beautify_data(newdata)}
|
context = {'data': self.beautify_data(newdata)}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
mail_template = get_template(f'evapp/{department}_mail.txt')
|
mail_template = get_template(f'evapp/department_mail.txt')
|
||||||
send_mail(
|
send_mail(
|
||||||
'EVA: Neuzugang',
|
'EVA: Neuzugang',
|
||||||
mail_template.render(context),
|
mail_template.render(context),
|
||||||
|
|
Loading…
Reference in New Issue