Commit 3022cfb9 by Chris Jerdonek

Renamed template variables to renderer in non-test files.

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