Commit that caused the change:
https://github.com/django/django/commit/ded502024191053475bac811d365ac29dca1db61
The logic is here in the `model_to_dict` method:
https://github.com/django/django/blob/1.10/django/forms/models.py#L91
And here in the field method:
https://github.com/django/django/blob/1.10/django/db/models/fields/related.py#L1564-L1570
I'd like to request to add this to the release notes for Django 1.10. I
couldn't find any note of it in there. I didn't know about the change,
and it caused some code to break. No big deal, was able to locate the
issue. Just want to point it out in case others may experience it.
Thank you
--
Ticket URL: <https://code.djangoproject.com/ticket/26999>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
* has_patch: 0 => 1
* type: Bug => Cleanup/optimization
* stage: Unreviewed => Accepted
Comment:
We don't normally document private API changes, however, my sense is that
`model_to_dict()` is widely used even though it's not documented. How
about:
{{{
* Private API ``django.forms.models.model_to_dict()`` returns a queryset
for
``ManyToManyField``\s rather than a list of IDs.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26999#comment:1>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"f4b1f972dc69e519a78182353e43701a17bb43aa" f4b1f972]:
{{{
#!CommitTicketReference repository=""
revision="f4b1f972dc69e519a78182353e43701a17bb43aa"
Fixed #26999 -- Documented model_to_dict() ManyToManyField change in 1.10.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26999#comment:2>
Comment (by Tim Graham <timograham@…>):
In [changeset:"b00a3f17209789fd6036aa93194c04b05f51047a" b00a3f17]:
{{{
#!CommitTicketReference repository=""
revision="b00a3f17209789fd6036aa93194c04b05f51047a"
[1.10.x] Fixed #26999 -- Documented model_to_dict() ManyToManyField change
in 1.10.
Backport of f4b1f972dc69e519a78182353e43701a17bb43aa from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26999#comment:3>