From 2b77da369dd2e027462fe548dad555430604b837 Mon Sep 17 00:00:00 2001 From: Michael Price Date: Fri, 2 Mar 2018 02:34:38 -0400 Subject: [PATCH] render_subtemplate's Context contructor needs a dictionary as the argument as per Django's release notes: https://docs.djangoproject.com/en/2.0/releases/1.11/#django-template-backends-django-template-render-prohibits-non-dict-context Signed-off-by: Michael Price --- mayan/apps/common/templatetags/common_tags.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mayan/apps/common/templatetags/common_tags.py b/mayan/apps/common/templatetags/common_tags.py index c1a35a6177..063179656b 100644 --- a/mayan/apps/common/templatetags/common_tags.py +++ b/mayan/apps/common/templatetags/common_tags.py @@ -84,9 +84,9 @@ def render_subtemplate(context, template_name, template_context): subtemplate contexts """ - new_context = Context(context) + new_context = Context(context.flatten()) new_context.update(Context(template_context)) - return get_template(template_name).render(new_context) + return get_template(template_name).render(new_context.flatten()) @register.simple_tag