@register.filter
@jinja2.contextfilter
def flag(context, addon):
 status = statusflags(context, addon)
 msg = {'unreviewed': _('Not Reviewed'), 'featuredaddon': _('Featured')}
 if status:
  return jinja2.Markup((u'<h5 class="flag">%s</h5>' % msg[status]))
 else:
  return ''

@ register . filter @ jinja2 . contextfilter def flag ( context , addon ) : status = statusflags ( context , addon ) msg = { 'unreviewed' : _ ( 'Not Reviewed' ) , 'featuredaddon' : _ ( 'Featured' ) } if status : return jinja2 . Markup ( ( u'<h5 class="flag">%s</h5>' % msg [ status ] ) ) else : return ''
does the value look like an on/off flag? .