mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #26402 -- Added relative path support in include/extends template tags.
This commit is contained in:
committed by
Tim Graham
parent
ad403ffa45
commit
aec4f97555
@@ -0,0 +1 @@
|
||||
{% include "./../../three.html" %}
|
||||
@@ -0,0 +1 @@
|
||||
{% include "./include_content.html" %}
|
||||
@@ -0,0 +1 @@
|
||||
dir2 include
|
||||
@@ -0,0 +1,3 @@
|
||||
{% extends "./../../one.html" %}
|
||||
|
||||
{% block content %}{{ block.super }} dir2 one{% endblock %}
|
||||
3
tests/template_tests/relative_templates/dir1/looped.html
Normal file
3
tests/template_tests/relative_templates/dir1/looped.html
Normal file
@@ -0,0 +1,3 @@
|
||||
{% extends "./dir2/../looped.html" %}
|
||||
|
||||
{% block content %}{{ block.super }} dir1 three{% endblock %}
|
||||
3
tests/template_tests/relative_templates/dir1/one.html
Normal file
3
tests/template_tests/relative_templates/dir1/one.html
Normal file
@@ -0,0 +1,3 @@
|
||||
{% extends "./../one.html" %}
|
||||
|
||||
{% block content %}{{ block.super }} dir1 one{% endblock %}
|
||||
3
tests/template_tests/relative_templates/dir1/one1.html
Normal file
3
tests/template_tests/relative_templates/dir1/one1.html
Normal file
@@ -0,0 +1,3 @@
|
||||
{% extends './../one.html' %}
|
||||
|
||||
{% block content %}{{ block.super }} dir1 one{% endblock %}
|
||||
3
tests/template_tests/relative_templates/dir1/one2.html
Normal file
3
tests/template_tests/relative_templates/dir1/one2.html
Normal file
@@ -0,0 +1,3 @@
|
||||
{% extends '../one.html' %}
|
||||
|
||||
{% block content %}{{ block.super }} dir1 one{% endblock %}
|
||||
3
tests/template_tests/relative_templates/dir1/one3.html
Normal file
3
tests/template_tests/relative_templates/dir1/one3.html
Normal file
@@ -0,0 +1,3 @@
|
||||
{% extends "../one.html" %}
|
||||
|
||||
{% block content %}{{ block.super }} dir1 one{% endblock %}
|
||||
3
tests/template_tests/relative_templates/dir1/three.html
Normal file
3
tests/template_tests/relative_templates/dir1/three.html
Normal file
@@ -0,0 +1,3 @@
|
||||
{% extends "./dir2/../../three.html" %}
|
||||
|
||||
{% block content %}{{ block.super }} dir1 three{% endblock %}
|
||||
3
tests/template_tests/relative_templates/dir1/two.html
Normal file
3
tests/template_tests/relative_templates/dir1/two.html
Normal file
@@ -0,0 +1,3 @@
|
||||
{% extends "./dir2/one.html" %}
|
||||
|
||||
{% block content %}{{ block.super }} dir1 two{% endblock %}
|
||||
@@ -0,0 +1,3 @@
|
||||
{% extends "./../two.html" %}
|
||||
|
||||
{% block content %}{{ block.super }} one{% endblock %}
|
||||
@@ -0,0 +1 @@
|
||||
{% include "./../three.html" %}
|
||||
3
tests/template_tests/relative_templates/one.html
Normal file
3
tests/template_tests/relative_templates/one.html
Normal file
@@ -0,0 +1,3 @@
|
||||
{% extends "./two.html" %}
|
||||
|
||||
{% block content %}{{ block.super }} one{% endblock %}
|
||||
1
tests/template_tests/relative_templates/three.html
Normal file
1
tests/template_tests/relative_templates/three.html
Normal file
@@ -0,0 +1 @@
|
||||
{% block content %}three{% endblock %}
|
||||
3
tests/template_tests/relative_templates/two.html
Normal file
3
tests/template_tests/relative_templates/two.html
Normal file
@@ -0,0 +1,3 @@
|
||||
{% extends "./three.html" %}
|
||||
|
||||
{% block content %}{{ block.super }} two{% endblock %}
|
||||
Reference in New Issue
Block a user