Fix error in context: it must be a dict

This commit is contained in:
Alessandro Pasotti
2017-06-15 08:00:13 +02:00
parent 2742d0df6e
commit 13bb415187

View File

@@ -82,10 +82,9 @@ def render_subtemplate(context, template_name, template_context):
Renders the specified template with the mixed parent and
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.assignment_tag