def bool_formatter(view, value):
 glyph = ('ok-circle' if value else 'minus-sign')
 fa = ('check-circle' if value else 'minus-circle')
 return Markup(('<span class="fa fa-%s glyphicon glyphicon-%s icon-%s"></span>' % (fa, glyph, glyph)))

def bool_formatter ( view , value ) : glyph = ( 'ok-circle' if value else 'minus-sign' ) fa = ( 'check-circle' if value else 'minus-circle' ) return Markup ( ( '<span class="fa fa-%s glyphicon glyphicon-%s icon-%s"></span>' % ( fa , glyph , glyph ) ) )
return check icon if value is true or empty string otherwise .