From 0cdc8515f4e6fbbc43c61fe8b9bfb00ad20b8ef7 Mon Sep 17 00:00:00 2001 From: Andrey Date: Wed, 15 Nov 2017 12:37:50 +0300 Subject: [PATCH] =?UTF-8?q?=D0=AF=D0=BD=D0=B4=D0=B5=D0=BA=D1=81=20=D0=B4?= =?UTF-8?q?=D0=B5=D0=BD=D1=8C=D0=B3=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- finance/signals.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/finance/signals.py b/finance/signals.py index b577d8b..07c038d 100644 --- a/finance/signals.py +++ b/finance/signals.py @@ -12,7 +12,7 @@ def delete_dependencies(instance, **kwargs): """Отправка сообщения после сохранения платежа""" if instance.yandex_pay and instance.method == 'Y' and instance.status == 'P': msg = EmailMessage( - 'Вам выставлен новый счёт!', + 'Вам выставлен новый счёт', '''Вам выставлен счёт, для оплаты перейдите по ссылке https://go.skillbox.ru/api/v1/finance/payment/%s/''' % instance.yandex_pay.id, 'robo@skillbox.ru', @@ -20,7 +20,7 @@ def delete_dependencies(instance, **kwargs): [instance.bill.opener.email], reply_to=[instance.bill.opener.email], ) - msg.message() + msg.send() if instance.status == 'F': if instance.is_open: @@ -30,13 +30,13 @@ def delete_dependencies(instance, **kwargs): active_obj=instance.bill.course.get_first(['tutorial', 'task',]) ) msg = EmailMessage( - 'Ваш платёж прошёл успешно!', + 'Ваш платёж прошёл успешно', '''Вам открыт доступ к курсу "%s", вы можете перейти по ссылке и ознакомиться с материабламиhttps://go.skillbox.ru/course/%s/''' % (instance.bill.course.title, instance.bill.course.slug), 'robo@skillbox.ru', [instance.yandex_pay.cps_email], - [instance.bill.opener.email], + cc=[instance.bill.opener.email], reply_to=[instance.bill.opener.email], ) else: @@ -45,10 +45,10 @@ def delete_dependencies(instance, **kwargs): '''Курс "%s" был забронирован''' % instance.bill.course.title, 'robo@skillbox.ru', [instance.yandex_pay.cps_email], - [instance.bill.opener.email], + cc=[instance.bill.opener.email], reply_to=[instance.bill.opener.email], ) - msg.message() + msg.send() if instance.status == 'C': msg = EmailMessage( @@ -60,10 +60,10 @@ def delete_dependencies(instance, **kwargs): которую превела к ошибке""" % (instance.bill.user.get_full_name(), instance.bill.course.title, instance.id), 'robo@skillbox.ru', - [instance.bill.opener.email], + cc=[instance.bill.opener.email], reply_to=["andrey.korolev@skillbox.ru"] ) - msg.message() + msg.send() @receiver(post_save, sender=Payment)