@register.filter
def label_tag(field, suffix=None):
 if (not hasattr(field, 'label_tag')):
  return ''
 return field.label_tag(label_suffix=suffix)

@ register . filter def label_tag ( field , suffix = None ) : if ( not hasattr ( field , 'label_tag' ) ) : return '' return field . label_tag ( label_suffix = suffix )
returns the label_tag for a field .