Context shoud be dict on render_email_template()
template.Context intance is no longer accepted
This commit is contained in:
parent
a2927f7616
commit
6d8a2ced53
|
@ -11,11 +11,8 @@ def render_email_template(template, context):
|
|||
{% 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 New Issue