def verify_and_send_notification_email(self):
context = {'user': self.creator, 'team': self}
subject = render_to_string(
'userdb/email/notify_team_verified_subject.txt', context)
text_content = render_to_string(
'userdb/email/notify_team_verified_email.txt', context)
html_content = render_to_string(
'userdb/email/notify_team_verified_email.html', context)
send_mail(
subject,
text_content,
settings.DEFAULT_FROM_EMAIL,
[self.creator.email],
html_message=html_content,
fail_silently=False
)
self.verified = True
self.save()
评论列表
文章目录