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 <loneviking72@gmail.com>
This commit is contained in:
Michael Price
2018-03-02 02:34:38 -04:00
committed by Roberto Rosario
parent 8f3e1a3eb0
commit 2b77da369d

View File

@@ -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