Commit 43cb2c22 by Eric Florenzano

More compact render_tag

parent 68f7cca5
......@@ -60,10 +60,7 @@ class Template(object):
def render_tag(self, tag_name, context):
"""Given a tag name and context, finds and renders the tag."""
if tag_name in context:
return context[tag_name]
else:
return ''
return context.get(tag_name, '')
def render_comment(self, tag_name=None, context=None):
"""Rendering a comment always returns nothing."""
......
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