def get_field_names_for_custom_model(model, conf, use_attname=False):
    """
    Obtain fields for a custom model `model`, depending on its configuration `conf`.
    If `use_attname` is True, use the `attname` property of the field, else the `name` property ("attname" has a "_id"
    suffix for ForeignKeys).
    """
    if 'fields' in conf:
        fields = conf['fields']
    else:
        fields = [f.attname if use_attname else f.name for f in model._meta.fields]

    exclude = set(conf.get('exclude_fields', []))

    return [f for f in fields if f not in exclude]