Tuesday, November 20, 2012

django password_reset_email.html not rendering in HTML

I have set up the password reset feature, but the email that gets sent
comes in plain text - it does not get rendered in HTML. I googled this
and found this on SO:

http://stackoverflow.com/questions/13285976/python-django-email-template-is-not-rendered-shows-html-tags-and-doesnt-conve/13286215#13286215

But I don't really understand the answer. Where exactly would I add the line:

msg.attach_alternative(t.render(Context({})), "text/html")

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate