Commit 9266ade9 by Ibrahim Awwal

Removed helpers.show_if.

I don't know why this was ever defined when python has a ternary operator
which doesn't require its arguments to be evaluated if the condition
evaluates to false, whereas this helper method does.
parent fd6e30ab
......@@ -17,12 +17,6 @@ def pluralize(singular_term, count):
return singular_term + 's'
return singular_term
def show_if(text, condition):
if condition:
return text
else:
return ''
# TODO there should be a better way to handle this
def include_mustache_templates():
mustache_dir = settings.PROJECT_ROOT / 'templates' / 'discussion' / 'mustache'
......@@ -35,7 +29,7 @@ def include_mustache_templates():
return '\n'.join(map(wrap_in_tag, map(strip_file_name, file_contents)))
def render_content(content, additional_context={}):
context = {
'content': extend_content(content),
content['type']: True,
......
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