Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert "ExtendsNode.parent_name_expr removed in Django 1.4"

This reverts commit e834281.
  • Loading branch information...
commit 06b7da6f86210a450f14aaeba6286477b5630c27 1 parent e834281
tomscytale authored
Showing with 4 additions and 10 deletions.
  1. +4 −10 sekizai/helpers.py
14 sekizai/helpers.py
View
@@ -10,11 +10,8 @@ def _extend_blocks(extend_node, blocks):
Extends the dictionary `blocks` with *new* blocks in the parent node (recursive)
"""
# we don't support variable extensions
- try:
- if extend_node.parent_name_expr:
- return
- except AttributeError:
- pass
+ if extend_node.parent_name_expr:
+ return
parent = extend_node.get_parent(None)
# Search for new blocks
for node in parent.nodelist.get_nodes_by_type(BlockNode):
@@ -39,11 +36,8 @@ def _extend_nodelist(extend_node):
ExtendsNode
"""
# we don't support variable extensions
- try:
- if extend_node.parent_name_expr:
- return []
- except AttributeError:
- pass
+ if extend_node.parent_name_expr:
+ return []
blocks = extend_node.blocks
_extend_blocks(extend_node, blocks)
found = []
Please sign in to comment.
Something went wrong with that request. Please try again.