forked from beba/foerderbarometer
first testmail
This commit is contained in:
parent
cf50e1ef12
commit
2a33d5bb38
|
@ -12,6 +12,9 @@ https://docs.djangoproject.com/en/3.1/ref/settings/
|
|||
|
||||
from pathlib import Path
|
||||
|
||||
# mails in development go to stdout
|
||||
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
||||
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ from django.shortcuts import render
|
|||
from django.forms import modelformset_factory
|
||||
from django.http import HttpResponse
|
||||
from formtools.wizard.views import CookieWizardView
|
||||
from django.core.mail import send_mail
|
||||
|
||||
from .forms import ProjectForm, VolunteerForm, LibraryForm, IFGForm
|
||||
from .models import Project
|
||||
|
@ -56,10 +57,6 @@ class ExternView(CookieWizardView):
|
|||
step = self.steps.current
|
||||
print ("get_form() step " + step)
|
||||
|
||||
# prev_data = self.get_cleaned_data_for_step(self.get_prev_step(
|
||||
# self.steps.current))
|
||||
# print (data)
|
||||
|
||||
if step == '1':
|
||||
prev_data = self.get_cleaned_data_for_step('0')
|
||||
if prev_data.get('choice') == 'IFG':
|
||||
|
@ -90,7 +87,14 @@ class ExternView(CookieWizardView):
|
|||
|
||||
# we need to send the following mails here:
|
||||
# - mail with entered data to the Volunteer
|
||||
# - mail to IF with link to accept/decline
|
||||
send_mail(
|
||||
'form filled',
|
||||
'you are such a great form filler!',
|
||||
'if-test@wikimedia.de',
|
||||
['benni.baermann@wikimedia.de'],
|
||||
fail_silently=False,
|
||||
)
|
||||
# - mail to IF with link to accept/decline
|
||||
|
||||
return done(self.request)
|
||||
# return render(self.request, 'saved', {
|
||||
|
|
Loading…
Reference in New Issue