Commit 3022cfb9 by Chris Jerdonek

Renamed template variables to renderer in non-test files.

parent d4125da5
......@@ -64,8 +64,8 @@ def main(sys_argv):
except IOError:
context = json.loads(context)
template = Renderer(template)
print(template.render(context))
renderer = Renderer(template)
print(renderer.render(context))
if __name__=='__main__':
......
......@@ -18,5 +18,5 @@ def render(template, context=None, **kwargs):
Return the given template string rendered using the given context.
"""
template = Renderer(template)
return template.render(context, **kwargs)
renderer = Renderer(template)
return renderer.render(context, **kwargs)
......@@ -98,9 +98,9 @@ class View(object):
Return the view rendered using the current context.
"""
template = Renderer(self.get_template(), self.load_template, output_encoding=encoding,
renderer = Renderer(self.get_template(), self.load_template, output_encoding=encoding,
escape=escape)
return template.render(self.context)
return renderer.render(self.context)
def get(self, key, default=None):
return self.context.get(key, default)
......
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