Commit f44c1e88 by Chris Jerdonek

Switched from using _parse() to _render() inside _make_get_section().

parent c7e71d8f
...@@ -222,8 +222,8 @@ class RenderEngine(object): ...@@ -222,8 +222,8 @@ class RenderEngine(object):
new_template = element(template[section_start_index:section_end_index]) new_template = element(template[section_start_index:section_end_index])
# Make sure we are dealing with a unicode template string. # Make sure we are dealing with a unicode template string.
new_template = self.literal(new_template) new_template = self.literal(new_template)
new_parsed_template = self._parse(new_template, delimiters=delims) rendered = self._render(new_template, context, delimiters=delims)
parts.append(new_parsed_template.render(context)) parts.append(rendered)
continue continue
context.push(element) context.push(element)
...@@ -248,7 +248,7 @@ class RenderEngine(object): ...@@ -248,7 +248,7 @@ class RenderEngine(object):
return parser.parse(template=template) return parser.parse(template=template)
def _render(self, template, context): def _render(self, template, context, delimiters=None):
""" """
Returns: a string of type unicode. Returns: a string of type unicode.
...@@ -265,7 +265,7 @@ class RenderEngine(object): ...@@ -265,7 +265,7 @@ class RenderEngine(object):
if type(template) is not unicode: if type(template) is not unicode:
raise Exception("Argument 'template' not unicode: %s: %s" % (type(template), repr(template))) raise Exception("Argument 'template' not unicode: %s: %s" % (type(template), repr(template)))
parsed_template = self._parse(template) parsed_template = self._parse(template, delimiters)
return parsed_template.render(context) return parsed_template.render(context)
......
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