[Django] #26891: ForeignObject/ForeignKey does not obey lookup registration API

16 views
Skip to first unread message

Django

unread,
Jul 12, 2016, 10:35:48 PM7/12/16
to django-...@googlegroups.com
#26891: ForeignObject/ForeignKey does not obey lookup registration API
----------------------------------------------+--------------------
Reporter: rpkilby | Owner: nobody
Type: Bug | Status: new
Component: Database layer (models, ORM) | Version: 1.9
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 0 | UI/UX: 0
----------------------------------------------+--------------------
`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

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

Django

unread,
Jul 12, 2016, 10:39:59 PM7/12/16
to django-...@googlegroups.com
#26891: ForeignObject/ForeignKey does not obey lookup registration API
-------------------------------------+-------------------------------------

Reporter: rpkilby | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.9
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by rpkilby):

* 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>

Django

unread,
Jul 13, 2016, 10:23:16 AM7/13/16
to django-...@googlegroups.com
#26891: ForeignObject/ForeignKey does not obey lookup registration API
-------------------------------------+-------------------------------------

Reporter: rpkilby | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.9
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/26891#comment:2>

Django

unread,
Aug 11, 2016, 2:17:08 PM8/11/16
to django-...@googlegroups.com
#26891: ForeignObject/ForeignKey does not obey lookup registration API
-------------------------------------+-------------------------------------
Reporter: rpkilby | Owner: nobody
Type: Bug | Status: closed

Component: Database layer | Version: 1.9
(models, ORM) |
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* 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>

Django

unread,
Jul 26, 2018, 11:01:55 AM7/26/18
to django-...@googlegroups.com
#26891: ForeignObject/ForeignKey does not obey lookup registration API
-------------------------------------+-------------------------------------
Reporter: Ryan P Kilby | Owner: nobody

Type: Bug | Status: closed
Component: Database layer | Version: 1.9
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

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>

Django

unread,
Aug 3, 2018, 1:29:18 AM8/3/18
to django-...@googlegroups.com
#26891: ForeignObject/ForeignKey does not obey lookup registration API
-------------------------------------+-------------------------------------
Reporter: Ryan P Kilby | Owner: nobody
Type: Bug | Status: closed
Component: Database layer | Version: 1.9
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

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>

Reply all
Reply to author
Forward
0 new messages