Answer the question
In order to leave comments, you need to log in
Django, send email template?
Hello guys.
I want to send a letter using a template and insert my variables there.
Everything turns out, but there is one problem, the letter comes in the source code.
I send a letter like this.
param = {"one":"Adrian","two":"two_avariable"}
message = render_to_string('newsletter/register.html', param)
param = {"one":"Adrian","two":"two_avariable"}
template = loader.get_template("newsletter/register.html")
message = template.render(param)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question