From 21ee9a0f608c264d163285753f20e7e4b90991db Mon Sep 17 00:00:00 2001 From: gzbender Date: Thu, 27 Sep 2018 17:24:03 +0500 Subject: [PATCH] =?UTF-8?q?LIL-503=20=D0=93=D1=80=D0=B0=D0=BC=D0=BE=D1=82?= =?UTF-8?q?=D1=8B=20=D0=B4=D0=BB=D1=8F=20=D1=83=D1=87=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=BA=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/notification/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/notification/utils.py b/apps/notification/utils.py index c04b3c0e..d556bd96 100644 --- a/apps/notification/utils.py +++ b/apps/notification/utils.py @@ -7,9 +7,9 @@ from project.celery import app @app.task -def send_email(subject, to_email, template_name, **kwargs): +def send_email(subject, to_email, template_name, attachments=[], **kwargs): html = get_template(template_name).render(kwargs) - email = EmailMessage(subject, html, to=[to_email]) + email = EmailMessage(subject, html, to=[to_email], attachments=attachments) email.content_subtype = 'html' email.send()