diff --git a/AUTHORS b/AUTHORS
index bb77b68..e2410ad 100644
|
a
|
b
|
answer newbie questions, and generally made Django that much better:
|
| 387 | 387 | ymasuda@ethercube.com |
| 388 | 388 | Jarek Zgoda <jarek.zgoda@gmail.com> |
| 389 | 389 | Cheng Zhang |
| | 390 | Matthias Kestenholz <mk@spinlock.ch> |
| 390 | 391 | |
| 391 | 392 | A big THANK YOU goes to: |
| 392 | 393 | |
diff --git a/django/template/loader_tags.py b/django/template/loader_tags.py
index 00ae99b..59955d3 100644
|
a
|
b
|
class ExtendsNode(Node):
|
| 70 | 70 | def render(self, context): |
| 71 | 71 | compiled_parent = self.get_parent(context) |
| 72 | 72 | pos = 0 |
| 73 | | while isinstance(compiled_parent.nodelist[pos], TextNode): |
| | 73 | # Prevent an IndexError when parent consists only of TextNodes |
| | 74 | length = len(compiled_parent.nodelist) |
| | 75 | while pos<length-1 and isinstance(compiled_parent.nodelist[pos], TextNode): |
| 74 | 76 | pos += 1 |
| 75 | 77 | parent_is_child = isinstance(compiled_parent.nodelist[pos], ExtendsNode) |
| 76 | 78 | parent_blocks = dict([(n.name, n) for n in compiled_parent.nodelist.get_nodes_by_type(BlockNode)]) |
diff --git a/tests/regressiontests/templates/tests.py b/tests/regressiontests/templates/tests.py
index 4effea5..c474018 100644
|
a
|
b
|
class Templates(unittest.TestCase):
|
| 704 | 704 | # Inheritance from local context with variable parent template |
| 705 | 705 | 'inheritance25': ("{% extends context_template.1 %}{% block first %}2{% endblock %}{% block second %}4{% endblock %}", {'context_template': [template.Template("Wrong"), template.Template("1{% block first %}_{% endblock %}3{% block second %}_{% endblock %}")]}, '1234'), |
| 706 | 706 | |
| | 707 | # Template with no tags |
| | 708 | 'inheritance26': ("no tags", {}, 'no tags'), |
| | 709 | |
| | 710 | # Inheritance from a template without tags |
| | 711 | 'inheritance27': ("{% extends 'inheritance26' %}", {}, 'no tags'), |
| | 712 | |
| 707 | 713 | ### I18N ################################################################## |
| 708 | 714 | |
| 709 | 715 | # {% spaceless %} tag |