1
0
mirror of https://github.com/django/django.git synced 2024-12-25 18:46:22 +00:00

Allowed more easily subclassing of BlockNode tags.

This commit is contained in:
Mitar 2013-12-28 12:18:34 +01:00 committed by Tim Graham
parent 114b70ccf8
commit b041850853

View File

@ -59,7 +59,7 @@ class BlockNode(Node):
if block is None:
block = self
# Create new block so we can store context without thread-safety issues.
block = BlockNode(block.name, block.nodelist)
block = type(self)(block.name, block.nodelist)
block.context = context
context['block'] = block
result = block.nodelist.render(context)