def django_boolean_icon(field_val, alt_text=None, title=None):
 BOOLEAN_MAPPING = {True: u'yes', False: u'no', None: u'unknown'}
 alt_text = (alt_text or BOOLEAN_MAPPING[field_val])
 if (title is not None):
  title = (u'title="%s" ' % title)
 else:
  title = u''
 icon_url = static((u'feincms/img/icon-%s.gif' % BOOLEAN_MAPPING[field_val]))
 return mark_safe((u'<img src="%s" alt="%s" %s/>' % (icon_url, alt_text, title)))

def django_boolean_icon ( field_val , alt_text = None , title = None ) : BOOLEAN_MAPPING = { True : u'yes' , False : u'no' , None : u'unknown' } alt_text = ( alt_text or BOOLEAN_MAPPING [ field_val ] ) if ( title is not None ) : title = ( u'title="%s" ' % title ) else : title = u'' icon_url = static ( ( u'feincms/img/icon-%s.gif' % BOOLEAN_MAPPING [ field_val ] ) ) return mark_safe ( ( u'<img src="%s" alt="%s" %s/>' % ( icon_url , alt_text , title ) ) )
return html code for a nice representation of true/false .