Commit 4c94e365 authored by Serge S. Koval's avatar Serge S. Koval

Merge pull request #105 from ArtemSerga/master

Add extra type formatter for `list` type
parents c1d85d3c 55b7b079
...@@ -31,7 +31,18 @@ def bool_formatter(value): ...@@ -31,7 +31,18 @@ def bool_formatter(value):
return Markup('<i class="icon-ok"></i>' if value else '') return Markup('<i class="icon-ok"></i>' if value else '')
def list_formatter(values):
"""
Return string with comma separated values
:param values:
Value to check
"""
return u', '.join(values)
DEFAULT_FORMATTERS = { DEFAULT_FORMATTERS = {
type(None): empty_formatter, type(None): empty_formatter,
bool: bool_formatter bool: bool_formatter,
list: list_formatter,
} }
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