new settings IF_EMAIL
This commit is contained in:
		
							parent
							
								
									2a33d5bb38
								
							
						
					
					
						commit
						6ddc55e287
					
				| 
						 | 
					@ -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,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',
 | 
					            settings.IF_EMAIL,
 | 
				
			||||||
            ['benni.baermann@wikimedia.de'],
 | 
					            [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…
	
		Reference in New Issue