def needs_label(model_field, field_name):
 default_label = field_name.replace('_', ' ').capitalize()
 return (capfirst(model_field.verbose_name) != default_label)

def needs_label ( model_field , field_name ) : default_label = field_name . replace ( '_' , ' ' ) . capitalize ( ) return ( capfirst ( model_field . verbose_name ) != default_label )
returns true if the label based on the models verbose name is not equal to the default label it would have based on its field name .