From 5cdacbda034af928f5033c9afc7b50ee0b13f75c Mon Sep 17 00:00:00 2001 From: Curtis Maloney Date: Wed, 28 Aug 2013 22:17:20 +1000 Subject: Fixed #17356 -- Allowed {% include %} to render compiled templates Reviewed by Loic Bistuer and Tim Graham. --- tests/template_tests/tests.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests') diff --git a/tests/template_tests/tests.py b/tests/template_tests/tests.py index 034280f08d..c2179b43c1 100644 --- a/tests/template_tests/tests.py +++ b/tests/template_tests/tests.py @@ -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): -- cgit v1.3