Re: [Django] #36986: Add Field.serialize_to_python/xml() and deserialize_from_python/xml() hooks (was: Add a hook to Serializer._value_from_field() for complex fields like CompositePrimaryKey)

2 views
Skip to first unread message

Django

unread,
Apr 6, 2026, 11:25:48 AM (2 days ago) Apr 6
to django-...@googlegroups.com
#36986: Add Field.serialize_to_python/xml() and deserialize_from_python/xml() hooks
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: Tim
Type: | Graham
Cleanup/optimization | Status: assigned
Component: Core | Version: dev
(Serialization) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* has_patch: 0 => 1
* summary:
Add a hook to Serializer._value_from_field() for complex fields like
CompositePrimaryKey
=>
Add Field.serialize_to_python/xml() and deserialize_from_python/xml()
hooks

Comment:

[https://github.com/django/django/pull/21054 PR #21054] replaces yaml's
`Serializer._value_from_field()` time handling with a representer. It
precedes [https://github.com/django/django/pull/21063 PR #21063] which
adds `Field.serialize_to_python/xml()` and `deserialize_from_python/xml()`
hooks.
--
Ticket URL: <https://code.djangoproject.com/ticket/36986#comment:13>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Reply all
Reply to author
Forward
0 new messages