Fixed #17356 -- Allowed {% include %} to render compiled templates

Reviewed by Loic Bistuer and Tim Graham.
This commit is contained in:
Curtis Maloney 2013-08-28 22:17:20 +10:00 committed by Anssi Kääriäinen
parent 169637649b
commit 5cdacbda03
4 changed files with 27 additions and 2 deletions

View file

@ -338,6 +338,17 @@ class TemplateLoaderTests(TestCase):
loader.template_source_loaders = old_loaders
settings.TEMPLATE_DEBUG = old_td
def test_include_template_argument(self):
"""
Support any render() supporting object
"""
ctx = Context({
'tmpl': Template('This worked!'),
})
outer_tmpl = Template('{% include tmpl %}')
output = outer_tmpl.render(ctx)
self.assertEqual(output, 'This worked!')
class TemplateRegressionTests(TestCase):