Re: [Django] #2843: serializer can't resolve a one-to-many relation from the "foreign" side (was: [patch] serializer can't resolve a one-to-many relation from the "foreign" side)

8 views
Skip to first unread message

Django

unread,
Dec 12, 2014, 4:01:31 PM12/12/14
to django-...@googlegroups.com
#2843: serializer can't resolve a one-to-many relation from the "foreign" side
-------------------------------------+-------------------------------------
Reporter: nikl@… | Owner: nobody
Type: New feature | Status: new
Component: Core | Version:
(Serialization) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: serialize json | Needs documentation: 1
python xml foreign key one to | Patch needs improvement: 1
many relationship | UI/UX: 0
Has patch: 1 |
Needs tests: 1 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------

--
Ticket URL: <https://code.djangoproject.com/ticket/2843#comment:9>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 5, 2015, 7:09:25 AM6/5/15
to django-...@googlegroups.com
#2843: serializer can't resolve a one-to-many relation from the "foreign" side
-------------------------------------+-------------------------------------
Reporter: nikl@… | Owner: nobody
Type: New feature | Status: closed
Component: Core | Version:
(Serialization) |
Severity: Normal | Resolution: wontfix
Keywords: serialize json | Triage Stage: Accepted

python xml foreign key one to |
many relationship |
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by freakboy3742):

* status: new => closed
* resolution: => wontfix


Comment:

I'm going to make an executive decision and close this as a wontfix.

This specific ticket is asking for a piecemeal addition to Django's
serializers; the real underlying problem is that Django's serializers
aren't as flexible as they need to be for real world problems. The example
given in this ticket is one type of serialisation for which there are real
use cases, but there are many others (e.g, depth > 1 serialization of
relationships).

Once upon a time, I harboured dreams of writing a fully flexible
serialisation framework for Django; luckily, that is no longer required,
as Tom Christie has written a very robust and flexible set of serializers
for Django REST Framework. If we want this in Django, we should maybe
approach Tom to pull that piece of REST Framework into Django; but
frankly, I'm not convinced this is worth the code churn (and it's one more
thing that the core team doesn't have to worry about, which is a good
thing).

--
Ticket URL: <https://code.djangoproject.com/ticket/2843#comment:10>

Reply all
Reply to author
Forward
0 new messages