Context shoud be dict on render_email_template()
template.Context intance is no longer accepted
This commit is contained in:
parent
a2927f7616
commit
6d8a2ced53
|
@ -10,12 +10,9 @@ def render_email_template(template, context):
|
|||
Renders an email template with this format:
|
||||
{% if subject %}Subject{% endif %}
|
||||
{% if message %}Email body{% endif %}
|
||||
|
||||
context can be a dictionary or a template.Context instance
|
||||
|
||||
context must be a dict
|
||||
"""
|
||||
if isinstance(context, dict):
|
||||
context = Context(context)
|
||||
|
||||
if not 'site' in context:
|
||||
from orchestra import settings
|
||||
url = urlparse(settings.ORCHESTRA_SITE_URL)
|
||||
|
|
Loading…
Reference in a new issue