bruth/django-preserialize

Add option for merging a single related field

bruth opened this issue · 1 comments

This is a common idiom:

template = {
    'fields': ['chr'],
    'key_map': {
        'chr': 'label',
    },
    'merge': True,
}

Which maps a single field on the related model and merges it into the parent model under the same name.

Implemented using the flat option for model instances.