mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
[3.2.x] Fixed #32290 -- Fixed TemplateNotFound in {% include %} tag for relative path in variable.
Backport of c978dd93fd from master
This commit is contained in:
committed by
Mariusz Felisiak
parent
4dbbe37479
commit
73e7bfc8f5
@@ -0,0 +1 @@
|
||||
{% include tmpl %}
|
||||
@@ -64,6 +64,12 @@ class IncludeRelativeBehaviorTests(SimpleTestCase):
|
||||
output = template.render(Context({}))
|
||||
self.assertEqual(output.strip(), 'dir2 include')
|
||||
|
||||
def test_normal_include_variable(self):
|
||||
engine = Engine(dirs=[RELATIVE])
|
||||
template = engine.get_template('dir1/dir2/inc3.html')
|
||||
output = template.render(Context({'tmpl': './include_content.html'}))
|
||||
self.assertEqual(output.strip(), 'dir2 include')
|
||||
|
||||
def test_dir2_include(self):
|
||||
engine = Engine(dirs=[RELATIVE])
|
||||
template = engine.get_template('dir1/dir2/inc1.html')
|
||||
|
||||
Reference in New Issue
Block a user