From cf50e1ef124deb68c4c173fbe6da894d5342bc15 Mon Sep 17 00:00:00 2001 From: Benni Baermann Date: Wed, 7 Oct 2020 13:15:00 +0200 Subject: [PATCH] just added some comments to clarify where we need to send which emails --- input/management/commands/sendmails.py | 13 +++++++++++++ input/views.py | 6 +++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/input/management/commands/sendmails.py b/input/management/commands/sendmails.py index b692197..a2c2218 100644 --- a/input/management/commands/sendmails.py +++ b/input/management/commands/sendmails.py @@ -1,7 +1,20 @@ from django.core.management.base import BaseCommand, CommandError +# mails must be send here: +# +# - two weeks after confirmation of support for volunteer (/extern) send link +# with surveylink +# +# - same for HonoraryCertificate and accreditation +# +# - travel: mail 3 weeks after end of project. +# +# - assumed end of project (/project) reached: mail to IF, link to project-editpage +# + class Command(BaseCommand): help = 'This command sends mail with surveylinks after some amount of time.' def handle(self, *args, **options): + self.stdout.write(self.style.SUCCESS('sendmails custom command executed')) diff --git a/input/views.py b/input/views.py index 8aebdcf..41ff8a8 100644 --- a/input/views.py +++ b/input/views.py @@ -82,12 +82,16 @@ class ExternView(CookieWizardView): # write data to database form = form.save(commit=False) # this is ugly code. how can we copy this without explicit writing? - # i found no way to access the ModelForm.Meta.exclude-array + # i found no way to access the ModelForm.Meta.exclude-tupel form.realname = data['realname'] form.username = data['username'] form.email = data['email'] form.save() + # we need to send the following mails here: + # - mail with entered data to the Volunteer + # - mail to IF with link to accept/decline + return done(self.request) # return render(self.request, 'saved', { # 'form_data': [form.cleaned_data for form in form_list],