#36986: Add a hook to Serializer._value_from_field() for complex fields like
CompositePrimaryKey
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: (none)
Type: | Status: new
Cleanup/optimization |
Component: Core | Version: dev
(Serialization) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Tim Graham):
That's insufficient. Notice that both `CompositePrimaryKey` and my example
in the description require the ability to call `self._value_from_field`
recursively. I'm considering the possibility of a registry that would
allow registering a field's function with the serializer, similar to how
lookups are registered to model fields.
--
Ticket URL: <https://code.djangoproject.com/ticket/36986#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019cf69daac4-831609e8-563c-40a0-8564-94f37c38d7be-000000%40eu-central-1.amazonses.com.