database change link to end of project mail added
This commit is contained in:
parent
f2d209688b
commit
2bb8ee517d
2 changed files with 5 additions and 3 deletions
|
@ -31,6 +31,8 @@ class Command(BaseCommand):
|
||||||
mail_template = get_template('input/if_end_of_project.txt')
|
mail_template = get_template('input/if_end_of_project.txt')
|
||||||
for project in old:
|
for project in old:
|
||||||
context = {'project': project}
|
context = {'project': project}
|
||||||
|
context['URLPREFIX'] = URLPREFIX
|
||||||
|
print(context)
|
||||||
try:
|
try:
|
||||||
send_mail('Projektende erreicht',
|
send_mail('Projektende erreicht',
|
||||||
mail_template.render(context),
|
mail_template.render(context),
|
||||||
|
@ -40,5 +42,4 @@ class Command(BaseCommand):
|
||||||
except BadHeaderError:
|
except BadHeaderError:
|
||||||
return HttpResponse('Invalid header found.')
|
return HttpResponse('Invalid header found.')
|
||||||
|
|
||||||
|
|
||||||
self.stdout.write(self.style.SUCCESS('sendmails custom command executed'))
|
self.stdout.write(self.style.SUCCESS('sendmails custom command executed'))
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
Hallo Team Ideenförderung!
|
Hallo Team Ideenförderung!
|
||||||
|
|
||||||
Das Project {{project.name}} hat am {{project.end}} sein vorraussichtliches Ende erreicht.
|
Das Project {{project.name}} hat am {{project.end}} sein vorraussichtliches
|
||||||
|
Ende erreicht.
|
||||||
|
|
||||||
Hier könnt ihr es in der Datenbank editieren:
|
Hier könnt ihr es in der Datenbank editieren:
|
||||||
|
|
||||||
INSERT LINK here ID: {{project.pid}}
|
{{URLPREFIX}}/admin/input/project/{{project.pk}}/change
|
||||||
|
|
||||||
mit freundlichen Grüßen, Eure Lieblingsdatenbank
|
mit freundlichen Grüßen, Eure Lieblingsdatenbank
|
||||||
|
|
Loading…
Reference in a new issue