Merge branch 'fix-context' into 'master'
Fix error in context: it must be a dict See merge request !15
This commit is contained in:
@@ -83,10 +83,9 @@ def render_subtemplate(context, template_name, template_context):
|
|||||||
Renders the specified template with the mixed parent and
|
Renders the specified template with the mixed parent and
|
||||||
subtemplate contexts
|
subtemplate contexts
|
||||||
"""
|
"""
|
||||||
|
new_context = Context(context.flatten())
|
||||||
new_context = Context(context)
|
|
||||||
new_context.update(Context(template_context))
|
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
|
@register.simple_tag
|
||||||
|
|||||||
Reference in New Issue
Block a user