From 6d8a2ced5398c46f03cbab620bf4dfb450969a22 Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Thu, 20 May 2021 14:08:09 +0200 Subject: [PATCH] Context shoud be dict on render_email_template() template.Context intance is no longer accepted --- orchestra/utils/mail.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/orchestra/utils/mail.py b/orchestra/utils/mail.py index caa4589e..25b256bf 100644 --- a/orchestra/utils/mail.py +++ b/orchestra/utils/mail.py @@ -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)