mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #3351 -- Added optional naming of the block in "endblock" tags to ensure
correct nesting. Thanks for the patch, SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4489 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -129,7 +129,7 @@ def do_block(parser, token):
|
||||
parser.__loaded_blocks.append(block_name)
|
||||
except AttributeError: # parser.__loaded_blocks isn't a list yet
|
||||
parser.__loaded_blocks = [block_name]
|
||||
nodelist = parser.parse(('endblock',))
|
||||
nodelist = parser.parse(('endblock','endblock %s' % block_name))
|
||||
parser.delete_first_token()
|
||||
return BlockNode(block_name, nodelist)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user