diff options
| author | Curtis Maloney <curtis@tinbrain.net> | 2013-08-28 22:17:20 +1000 |
|---|---|---|
| committer | Anssi Kääriäinen <akaariai@gmail.com> | 2013-08-29 10:22:24 +0300 |
| commit | 5cdacbda034af928f5033c9afc7b50ee0b13f75c (patch) | |
| tree | 5621b597d673fffbcca6c70fbdd3f132ec1b1f31 /tests | |
| parent | 169637649baa012a8a77b17465c5c0c1085336ea (diff) | |
Fixed #17356 -- Allowed {% include %} to render compiled templates
Reviewed by Loic Bistuer and Tim Graham.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/template_tests/tests.py | 11 |
1 files changed, 11 insertions, 0 deletions
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): |
