1
如何调用模板而不是纯HTML来发送带有django核心电子邮件的电子邮件?在django核心电子邮件中的html_content中调用模板
我的观点:
to = articles.user.email
html_content = '<p>This is your email content...</p>'
msg = EmailMultiAlternatives('You have an email',html_content,'[email protected]',[to])
msg.attach_alternative(html_content,'text/html')
msg.send()
在变html_content
可以看到的是纯HTML,我怎么能在这里打电话的模板?这个模板将是电子邮件的内容。
可能重复(http://stackoverflow.com/questions/2809547/creating-email-模板与 - 的Django) –