diff --git a/tests/issue24555/__init__.py b/tests/issue24555/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/issue24555/templates/issue24555.html b/tests/issue24555/templates/issue24555.html
new file mode 100644
index 0000000..72b32d0
-
|
+
|
|
| 1 | {% load tags %} |
| 2 | <!DOCTYPE html> |
| 3 | <html> |
| 4 | <body> |
| 5 | {% show_widget_1 'hello' %} |
| 6 | {% show_widget_2 'hello 2' %} |
| 7 | </body> |
| 8 | </html> |
diff --git a/tests/issue24555/templates/widget_1.html b/tests/issue24555/templates/widget_1.html
new file mode 100644
index 0000000..ddaf0df
-
|
+
|
|
| 1 | {% extends wrapper %} |
| 2 | |
| 3 | |
| 4 | {% block content %} |
| 5 | <div> |
| 6 | <h1>{{ title }}</h1> |
| 7 | content 1 |
| 8 | </div> |
| 9 | {% endblock %} |
diff --git a/tests/issue24555/templates/widget_2.html b/tests/issue24555/templates/widget_2.html
new file mode 100644
index 0000000..71b7a2b
-
|
+
|
|
| 1 | |
| 2 | {% extends wrapper %} |
| 3 | |
| 4 | |
| 5 | {% block content %} |
| 6 | <div> |
| 7 | <h1>{{ title }}</h1> |
| 8 | content 2 |
| 9 | </div> |
| 10 | {% endblock %} |
| 11 | |
diff --git a/tests/issue24555/templates/wrapper_1.html b/tests/issue24555/templates/wrapper_1.html
new file mode 100644
index 0000000..9b5178d
-
|
+
|
|
| 1 | {% block content %}{% endblock content %} |
diff --git a/tests/issue24555/templates/wrapper_2.html b/tests/issue24555/templates/wrapper_2.html
new file mode 100644
index 0000000..9b5178d
-
|
+
|
|
| 1 | {% block content %}{% endblock content %} |
diff --git a/tests/issue24555/templatetags/__init__.py b/tests/issue24555/templatetags/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/issue24555/templatetags/tags.py b/tests/issue24555/templatetags/tags.py
new file mode 100644
index 0000000..12e5e04
-
|
+
|
|
| 1 | from django import template |
| 2 | |
| 3 | register = template.Library() |
| 4 | |
| 5 | @register.inclusion_tag('widget_1.html') |
| 6 | def show_widget_1(title): |
| 7 | return { |
| 8 | 'title': title, |
| 9 | 'wrapper': 'wrapper_1.html', |
| 10 | } |
| 11 | |
| 12 | |
| 13 | @register.inclusion_tag('widget_2.html') |
| 14 | def show_widget_2(title): |
| 15 | return { |
| 16 | 'title': title, |
| 17 | 'wrapper': 'wrapper_2.html', |
| 18 | } |
diff --git a/tests/issue24555/tests.py b/tests/issue24555/tests.py
new file mode 100644
index 0000000..f4b663c
-
|
+
|
|
| 1 | from django.template import Context |
| 2 | from django.template.loader import get_template |
| 3 | from django.test import TestCase |
| 4 | |
| 5 | |
| 6 | class ReproductionTestCase(TestCase): |
| 7 | def test_reproduction(self): |
| 8 | tpl = get_template('issue24555.html') |
| 9 | rendered = tpl.render(Context()) |
| 10 | expected = ''' |
| 11 | <!DOCTYPE html> |
| 12 | <html> |
| 13 | <body> |
| 14 | <div> |
| 15 | <h1>hello</h1> |
| 16 | content 1 |
| 17 | </div> |
| 18 | <div> |
| 19 | <h1>hello 2</h1> |
| 20 | content 2 |
| 21 | </div> |
| 22 | </body> |
| 23 | </html>''' |
| 24 | self.assertHTMLEqual(rendered, expected) |