Commit d8067382 by Chris Jerdonek

Loading of partials now respects the template extension configured on the view:

 * Template._render_partial() now passes self.view.template_extension to
   Loader.load_template().

 * The test case test_examples.test_template_partial_extension now passes.

 * Corrected the expectation of the test case test_simple.test_template_partial_extension.
   It passes under the change to Template._render_partial().

 * Removed trailing white space in test_simple.py.
parent 23feb60d
......@@ -160,7 +160,7 @@ class Template(object):
@modifiers.set('>')
def _render_partial(self, template_name):
from pystache import Loader
markup = Loader().load_template(template_name, self.view.template_path, encoding=self.view.template_encoding)
markup = Loader().load_template(template_name, self.view.template_path, encoding=self.view.template_encoding, extension=self.view.template_extension)
template = Template(markup, self.view)
return template.render()
......
......@@ -45,5 +45,6 @@ class TestSimple(unittest.TestCase):
self.assertEquals(view.render(), """Welcome
-------
Again, Welcome!
## Again, Welcome! ##
""")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment