# Path: rest_framework_extensions/utils.py
# def get_model_opts_concrete_fields(opts):
#     # todo: test me
#     if not hasattr(opts, 'concrete_fields'):
#         opts.concrete_fields = [f for f in opts.fields if f.column is not None]
#     return opts.concrete_fields


from rest_framework_extensions.utils import get_model_opts_concrete_fields


def get_fields_for_partial_update(opts, init_data, fields, init_files=None):
    opts = opts.model._meta.concrete_model._meta
    partial_fields = list((init_data or {}).keys()) + \
        list((init_files or {}).keys())
    concrete_field_names = []

# Path: rest_framework_extensions/utils.py
# def get_model_opts_concrete_fields(opts):
#     # todo: test me
#     if not hasattr(opts, 'concrete_fields'):
#         opts.concrete_fields = [f for f in opts.fields if f.column is not None]
#     return opts.concrete_fields


# Path: rest_framework_extensions/serializers.py
from rest_framework_extensions.utils import get_model_opts_concrete_fields



def get_fields_for_partial_update(opts, init_data, fields, init_files=None):
    opts = opts.model._meta.concrete_model._meta
    partial_fields = list((init_data or {}).keys()) + \
        list((init_files or {}).keys())
    concrete_field_names = []

    for field in get_model_opts_concrete_fields(opts):