Django: Display Website Name In Template/Emails Without Using Sites Framework
I want to render my website name in django templates. Django's own docs on Sites state: Use it if your single Django installation powers more than one site and you need to diffe
Solution 1:
Based on Django custom context_processors in render_to_string method you should pass the request to render_to_string
.
msg_plain = render_to_string('email_change_email.txt', context, request=request)
msg_html = render_to_string('email_change_email.html', context, request=request)
Post a Comment for "Django: Display Website Name In Template/Emails Without Using Sites Framework"