fix locale and country code in task

This commit is contained in:
michail 2019-09-30 12:18:18 +05:00
parent b96ed30a49
commit c28d1cf3a0

View File

@ -18,9 +18,9 @@ def send_email_with_news(news_ids):
sent_news = models.News.objects.get(id=n)
send_mail("G&M News", render_to_string(settings.NEWS_EMAIL_TEMPLATE,
{"title": sent_news.title.get(s.country_code),
"subtitle": sent_news.subtitle.get(s.country_code),
"description": sent_news.description.get(s.country_code),
{"title": sent_news.title.get(s.locale),
"subtitle": sent_news.subtitle.get(s.locale),
"description": sent_news.description.get(s.locale),
"code": s.update_code,
"domain_uri": settings.DOMAIN_URI}),
settings.EMAIL_HOST_USER, [s.send_to], fail_silently=False)