Skip to content

Commit

Permalink
in django 1.3 there is a problem with nested extends.
Browse files Browse the repository at this point in the history
To fix: comment out line 47 with "t.render(context_instance" and add "template._render(context)" after line 15.

Seems like it helps. Still not sure why exactly it does.
  • Loading branch information
eugenyboger authored and clokep committed May 18, 2016
1 parent 4a7a995 commit b092fb8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
-e .

# Not tested with older versions of Django.
Django==1.1.4 # Actually 0.96, but this is the oldest on pypi.
Django==1.3
1 change: 1 addition & 0 deletions template.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def render_template_block(template, block, context):
"""
Renders a single block from a template. This template should have previously been rendered.
"""
template._render(context)
return render_template_block_nodelist(template.nodelist, block, context)

def render_template_block_nodelist(nodelist, block, context):
Expand Down

0 comments on commit b092fb8

Please sign in to comment.