However, the raw_id_fields widget does not handle this correctly, and it
generates a url like so:
`/admin/auth/user/?last_login__lte=%3Cbuilt-
in%20method%20today%20of%20type%20object%20at%200xb72cd440%3E`
As far as I can tell, this has never worked correctly. I have a simple app
that demonstrates the problem:
https://github.com/collinanderson/limit_choices_to/commit/8e30de93dea1908ae363b8556e3f89d36b031e79
--
Ticket URL: <https://code.djangoproject.com/ticket/20865>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* has_patch: 0 => 1
* version: master => 1.6-beta-1
* needs_tests: => 1
* needs_docs: => 0
Comment:
I realize that we're discussing a new api for limit_choices_to, but in the
meantime this should fix it:
https://github.com/django/django/pull/1442
--
Ticket URL: <https://code.djangoproject.com/ticket/20865#comment:1>
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/20865#comment:2>
* needs_tests: 1 => 0
Comment:
pull request now has a test https://github.com/django/django/pull/1442
--
Ticket URL: <https://code.djangoproject.com/ticket/20865#comment:3>
* stage: Accepted => Ready for checkin
Comment:
Looks good to me.
--
Ticket URL: <https://code.djangoproject.com/ticket/20865#comment:4>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"d53e574676ba0809394017f1f3a5bc24512e5bed"]:
{{{
#!CommitTicketReference repository=""
revision="d53e574676ba0809394017f1f3a5bc24512e5bed"
Fixed #20865 -- Fixed raw_id_fields to work with callable
limit_choices_to.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/20865#comment:5>
Comment (by Tim Graham <timograham@…>):
In [changeset:"e3e0cf8a0f75ae18bc401182bfbdea2c27bb0244"]:
{{{
#!CommitTicketReference repository=""
revision="e3e0cf8a0f75ae18bc401182bfbdea2c27bb0244"
[1.6.x] Fixed #20865 -- Fixed raw_id_fields to work with callable
limit_choices_to.
Backport of d53e574676 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/20865#comment:6>