diff --git a/django/template/__init__.py b/django/template/__init__.py
index 5c4ab30..6365243 100644
a
|
b
|
class Parser(object):
|
266 | 266 | try: |
267 | 267 | compile_func = self.tags[command] |
268 | 268 | except KeyError: |
269 | | self.invalid_block_tag(token, command) |
| 269 | self.invalid_block_tag(token, command, parse_until) |
270 | 270 | try: |
271 | 271 | compiled_result = compile_func(self, token) |
272 | 272 | except TemplateSyntaxError, e: |
… |
… |
class Parser(object):
|
317 | 317 | def empty_block_tag(self, token): |
318 | 318 | raise self.error(token, "Empty block tag") |
319 | 319 | |
320 | | def invalid_block_tag(self, token, command): |
| 320 | def invalid_block_tag(self, token, command, parse_until=None): |
| 321 | if parse_until: |
| 322 | raise self.error(token, "Invalid block tag: '%s', expected one of '%s'" % (command, "', '".join(parse_until))) |
321 | 323 | raise self.error(token, "Invalid block tag: '%s'" % command) |
322 | 324 | |
323 | 325 | def unclosed_block_tag(self, parse_until): |