The PR should allow users to successfully register lookups while ignoring
the default lookups registered to the `Field`. This works by duplicating
`RegisterLookupMixin._get_lookup`, but stopping mro walking at
`ForeignObject`.
https://github.com/django/django/pull/6906
--
Ticket URL: <https://code.djangoproject.com/ticket/26891>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: rpkilby@… (added)
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Old description:
> `ForeignObject`'s implementation of `get_lookup` and `get_transform`
> causes `register_lookup` to essentially have no effect.
>
> The PR should allow users to successfully register lookups while ignoring
> the default lookups registered to the `Field`. This works by duplicating
> `RegisterLookupMixin._get_lookup`, but stopping mro walking at
> `ForeignObject`.
> https://github.com/django/django/pull/6906
New description:
`ForeignObject`'s implementation of `get_lookup` and `get_transform`
causes `register_lookup` to essentially have no effect.
The PR should allow users to successfully register lookups while ignoring
the default lookups registered to `Field`. This works by duplicating
`RegisterLookupMixin._get_lookup`, but stopping mro walking at
`ForeignObject`.
https://github.com/django/django/pull/6906
--
--
Ticket URL: <https://code.djangoproject.com/ticket/26891#comment:1>
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/26891#comment:2>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"7aeb7390fc4231119494a9ebdee3c6ee0d5af053" 7aeb7390]:
{{{
#!CommitTicketReference repository=""
revision="7aeb7390fc4231119494a9ebdee3c6ee0d5af053"
Fixed #26891 -- Fixed lookup registration for ForeignObject.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26891#comment:3>
Comment (by Tim Graham <timograham@…>):
In [changeset:"a67ebcb1cbd37e1fc9eddd2da1dda7f319c5ac1d" a67ebcb1]:
{{{
#!CommitTicketReference repository=""
revision="a67ebcb1cbd37e1fc9eddd2da1dda7f319c5ac1d"
Refs #29593, #26891 -- Doc'd RegisterLookupMixin.get_lookups().
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26891#comment:4>
Comment (by Carlton Gibson <carlton.gibson@…>):
In [changeset:"a004350193a503b6722633c4309f70551fde0983" a0043501]:
{{{
#!CommitTicketReference repository=""
revision="a004350193a503b6722633c4309f70551fde0983"
[2.1.x] Refs #29593, #26891 -- Doc'd RegisterLookupMixin.get_lookups().
Backport of a67ebcb1cbd37e1fc9eddd2da1dda7f319c5ac1d from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26891#comment:5>