From 34b78aff94e64d3898e8352dfc341a48e7443314 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Wed, 6 Jul 2022 22:07:17 +0300 Subject: [PATCH] fix: Rendering of email templates needs access to `settings` (#4163) Since #4104. --- ietf/utils/mail.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ietf/utils/mail.py b/ietf/utils/mail.py index c18981d41..88f74a972 100644 --- a/ietf/utils/mail.py +++ b/ietf/utils/mail.py @@ -183,6 +183,7 @@ def send_mail(request, to, frm, subject, template, context, *args, **kwargs): The body is a text/plain rendering of the template with the context. extra is a dict of extra headers to add. ''' + context["settings"] = settings txt = render_to_string(template, context, request=request) return send_mail_text(request, to, frm, subject, txt, *args, **kwargs) @@ -628,4 +629,4 @@ def get_payload_text(msg, decode=True, default_charset="utf-8"): payload = msg.get_payload(decode=decode) payload = payload.decode(str(charset)) return payload - \ No newline at end of file +