Browse Source

new settings IF_EMAIL

master
Benni Baermann 4 years ago
parent
commit
6ddc55e287
2 changed files with 6 additions and 2 deletions
  1. +3
    -0
      foerderbarometer/settings.py
  2. +3
    -2
      input/views.py

+ 3
- 0
foerderbarometer/settings.py View File

@ -15,6 +15,9 @@ from pathlib import Path
# mails in development go to stdout # mails in development go to stdout
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
# mail for IF-OTRS
IF_EMAIL = 'if-test@wikimedia.de'
# Build paths inside the project like this: BASE_DIR / 'subdir'. # Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent BASE_DIR = Path(__file__).resolve().parent.parent

+ 3
- 2
input/views.py View File

@ -3,6 +3,7 @@ from django.forms import modelformset_factory
from django.http import HttpResponse from django.http import HttpResponse
from formtools.wizard.views import CookieWizardView from formtools.wizard.views import CookieWizardView
from django.core.mail import send_mail from django.core.mail import send_mail
from django.conf import settings
from .forms import ProjectForm, VolunteerForm, LibraryForm, IFGForm from .forms import ProjectForm, VolunteerForm, LibraryForm, IFGForm
from .models import Project from .models import Project
@ -90,8 +91,8 @@ class ExternView(CookieWizardView):
send_mail( send_mail(
'form filled', 'form filled',
'you are such a great form filler!', 'you are such a great form filler!',
'if-test@wikimedia.de',
['benni.baermann@wikimedia.de'],
settings.IF_EMAIL,
[form.email],
fail_silently=False, fail_silently=False,
) )
# - mail to IF with link to accept/decline # - mail to IF with link to accept/decline

Loading…
Cancel
Save