> limit_choices_to has no effect when used on a ManyToManyField with a
custom intermediate table specified using the through parameter.
`ManyToManyField._check_ignored_options` seems like the perfect place to
add this check.
--
Ticket URL: <https://code.djangoproject.com/ticket/26796>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/26796#comment:1>
* owner: nobody => andersonresende
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/26796#comment:2>
Comment (by andersonresende):
What should be the warning message?
--
Ticket URL: <https://code.djangoproject.com/ticket/26796#comment:3>
Comment (by charettes):
Replying to [comment:3 andersonresende]:
> What should be the warning message?
Have a look at the other messages in
`ManyToManyField._check_ignored_options`.
Something along the line of ''limit_choices_to has no effect on
ManyToManyField with an explicit intermediary model.'' should do?
--
Ticket URL: <https://code.djangoproject.com/ticket/26796#comment:4>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/6894 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/26796#comment:5>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/26796#comment:6>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"ba53da894fc713629ae4d3fbdd14eff98c808389" ba53da89]:
{{{
#!CommitTicketReference repository=""
revision="ba53da894fc713629ae4d3fbdd14eff98c808389"
Fixed #26796 -- Added a system check for m2m fields with ignored
limit_choices_to.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26796#comment:7>
* keywords: => 1.11
* status: closed => new
* has_patch: 1 => 0
* resolution: fixed =>
* stage: Ready for checkin => Accepted
Comment:
Reopening as this
[https://github.com/django/django/commit/ba53da894fc713629ae4d3fbdd14eff98c808389#commitcomment-18263905
doesn't seem to be working correctly].
--
Ticket URL: <https://code.djangoproject.com/ticket/26796#comment:8>
* status: new => assigned
* cc: kevswanberg@… (added)
* has_patch: 0 => 1
* owner: andersonresende => kevswanberg
--
Ticket URL: <https://code.djangoproject.com/ticket/26796#comment:9>
Comment (by Tim Graham <timograham@…>):
In [changeset:"17a0a6667c3f77908f9427f6489e298c828133e2" 17a0a666]:
{{{
#!CommitTicketReference repository=""
revision="17a0a6667c3f77908f9427f6489e298c828133e2"
Refs #26796 -- Fixed ManyToManyField's limit_choices_to warning without a
through model.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26796#comment:10>
* status: assigned => closed
* resolution: => fixed
--
Ticket URL: <https://code.djangoproject.com/ticket/26796#comment:11>