(model_class)
return direct_fields
Direct, not m2m, not FK
Direct, not m2m, not FK
Direct not m2m not FK
def get_direct_fields_from_model(model_class):
    """ Direct, not m2m, not FK """
    direct_fields = []
    all_fields_names = get_all_field_names(model_class)
    for field_name in all_fields_names:
        field = model_class._meta.get_field(field_name)
        direct = field.concrete
        m2m = field.many_to_many
        if direct and not m2m and not field.is_relation:
            direct_fields += [field]
    return direct_fields
def get_direct_fields_from_model ( model_class ) : direct_fields = [ ] all_fields_names = get_all_field_names ( model_class ) for field_name in all_fields_names : field = model_class . _meta . get_field ( field_name ) direct = field . concrete m2m = field . many_to_many if direct and not m2m and not field . is_relation : direct_fields += [ field ] return direct_fields