mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #32290 -- Fixed TemplateNotFound in {% include %} tag for relative path in variable.
This commit is contained in:
committed by
Mariusz Felisiak
parent
640a6e1dce
commit
c978dd93fd
@@ -70,6 +70,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