removing notification for new workout sync, adding CN liked KML api
This commit is contained in:
@@ -112,24 +112,27 @@ def send_template_email(from_email, to_email, subject,
|
||||
else:
|
||||
emailbounced = False
|
||||
|
||||
for recipient in to_email:
|
||||
try:
|
||||
soup = BeautifulSoup(html_content)
|
||||
createmessage = kwargs.get('createmessage', True)
|
||||
|
||||
s2 = soup.body
|
||||
|
||||
usr = User.objects.get(email=recipient)
|
||||
umsg = UserMessage(
|
||||
receiver = usr.rower,
|
||||
datetime = timezone.now(),
|
||||
text = '{text}'.format(text=s2),
|
||||
subject=subject,
|
||||
)
|
||||
umsg.save()
|
||||
except User.DoesNotExist:
|
||||
pass
|
||||
except Exception as e:
|
||||
pass
|
||||
if createmessage:
|
||||
for recipient in to_email:
|
||||
try:
|
||||
soup = BeautifulSoup(html_content)
|
||||
|
||||
s2 = soup.body
|
||||
|
||||
usr = User.objects.get(email=recipient)
|
||||
umsg = UserMessage(
|
||||
receiver = usr.rower,
|
||||
datetime = timezone.now(),
|
||||
text = '{text}'.format(text=s2),
|
||||
subject=subject,
|
||||
)
|
||||
umsg.save()
|
||||
except User.DoesNotExist:
|
||||
pass
|
||||
except Exception as e:
|
||||
pass
|
||||
|
||||
if not emailbounced:
|
||||
res = msg.send()
|
||||
@@ -152,7 +155,7 @@ def send_confirm(user, name, link, options): # pragma: no cover
|
||||
_ = send_template_email('Rowsandall <info@rowsandall.com>',
|
||||
[fullemail],
|
||||
subject, 'confirmemail.html',
|
||||
d
|
||||
d, createmessage=False
|
||||
)
|
||||
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user