WMDE
/
eva
forked from tohe/eva
7
1
Fork 0

added correct path for logo on pdf

This commit is contained in:
root 2026-04-08 14:13:05 +00:00
parent 78539cb582
commit 5ff89e009e
1 changed files with 4 additions and 4 deletions

View File

@ -162,7 +162,7 @@ class EvaFormView(LoginRequiredMixin, CookieWizardView):
return HttpResponseRedirect('success') return HttpResponseRedirect('success')
def send_mail_to_department(self, department, pdf=None): def send_mail_to_department(self, department):
'send a mail to the given department with the nececcary notifications' 'send a mail to the given department with the nececcary notifications'
print(f'send mail to department {department}...') print(f'send mail to department {department}...')
@ -180,7 +180,7 @@ class EvaFormView(LoginRequiredMixin, CookieWizardView):
#hardcoded imagepath => change for production!!! #hardcoded imagepath => change for production!!!
context_pdf ={ context_pdf ={
'pdf_data': pdf_data, 'pdf_data': pdf_data,
'image_path': '/srv/austritt/static/evapp/logo.png' 'image_path': '/srv/eva/austritt/static/evapp/logo.png'
} }
html_string =render_to_string('austritt/pdf_template.html', context_pdf, request=self.request) html_string =render_to_string('austritt/pdf_template.html', context_pdf, request=self.request)
buffer=io.BytesIO() buffer=io.BytesIO()
@ -203,9 +203,9 @@ class EvaFormView(LoginRequiredMixin, CookieWizardView):
elif department != "SUBMITTER": elif department != "SUBMITTER":
# comment this back in if you wanna run mail attachments # comment this back in if you wanna run mail attachments
if pdf and department == "OFFICE": if pdf_bytes and department == "OFFICE":
mail= EmailMessage( mail= EmailMessage(
subject=f'EVA: Austritt {firstname} {lastname} {lastday} (MAILTEST)', subject=f'EVA: Austritt {firstname} {lastname} {lastday}',
body=mail_template.render(context), body=mail_template.render(context),
from_email=EVA_MAIL, from_email=EVA_MAIL,
to=[EVA_MAIL], to=[EVA_MAIL],