1
0
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:
Malcolm Tredinnick
2007-02-12 00:22:22 +00:00
parent d123588184
commit a0c354ee4e
3 changed files with 21 additions and 1 deletions

View File

@@ -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)