(self)
return display_fields.exclude(id__in=[o.id for o in bad_display_fields])
Returns only valid display fields
Returns only valid display fields
Returns only valid display fields
def get_good_display_fields(self):
        """ Returns only valid display fields """
        display_fields = self.displayfield_set.all()
        bad_display_fields = []
        for display_field in display_fields:
            if display_field.field_type == "Invalid":
                bad_display_fields.append(display_field)
        return display_fields.exclude(id__in=[o.id for o in bad_display_fields])
def get_good_display_fields ( self ) : display_fields = self . displayfield_set . all ( ) bad_display_fields = [ ] for display_field in display_fields : if display_field . field_type == "Invalid" : bad_display_fields . append ( display_field ) return display_fields . exclude ( id__in = [ o . id for o in bad_display_fields ] )