Re: [Django] #10743: Support lookup separators in ModelAdmin.list_display

27 views
Skip to first unread message

Django

unread,
Jun 7, 2014, 11:41:44 AM6/7/14
to django-...@googlegroups.com
#10743: Support lookup separators in ModelAdmin.list_display
-------------------------------------+-------------------------------------
Reporter: mrts | Owner: nobody
Type: New feature | Status: closed
Component: contrib.admin | Version: master
Severity: Normal | Resolution: wontfix
Keywords: efficient-admin, | Triage Stage: Accepted
list_display | Needs documentation: 1
Has patch: 1 | Patch needs improvement: 0
Needs tests: 1 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by aaugustin):

* status: new => closed
* resolution: => wontfix


Comment:

If I understand correctly, the goal of this ticket is to enable Django to
automatically optimize the queryset for building the admin changelist by
adding appropriate fields to select_related() and only().

But that can't be done automatically as soon as someone puts a callable in
`display_list`. So we're back to square 1, except Django pretended that it
could handle the optimization automatically, and failed at that.

In my opinion that would be worse that just telling the user to write an
appropriate get_queryset. For this reason (and also considering limited
demand for this feature over the last five years) I'm going to reject this
ticket.

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

Django

unread,
Dec 24, 2015, 6:04:24 AM12/24/15
to django-...@googlegroups.com
#10743: Support lookup separators in ModelAdmin.list_display
-------------------------------------+-------------------------------------
Reporter: mrts | Owner: nobody
Type: New feature | Status: new

Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: efficient-admin, | Triage Stage: Accepted
list_display |
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by aaugustin):

* status: closed => new
* resolution: wontfix =>


Comment:

I'm going to reopen this ticket because I disagree with my 19-month-ago-
former-self.

My present-day-self keeps trying to write:

{{{
list_display = ['foo__bar']
}}}

and being mad at Django that it doesn't work.

We could limit that syntax to relation fields and not support calling
methods on the target model if that helps. It would still solve 95% of the
problem.

--
Ticket URL: <https://code.djangoproject.com/ticket/10743#comment:5>

Django

unread,
Apr 13, 2016, 11:44:11 PM4/13/16
to django-...@googlegroups.com
#10743: Support lookup separators in ModelAdmin.list_display
-------------------------------------+-------------------------------------
Reporter: mrts | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: efficient-admin, | Triage Stage: Accepted
list_display |
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by zachborboa):

* cc: zachborboa@… (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/10743#comment:6>

Django

unread,
May 29, 2016, 9:53:59 AM5/29/16
to django-...@googlegroups.com
#10743: Support lookup separators in ModelAdmin.list_display
-------------------------------------+-------------------------------------
Reporter: mrts | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: efficient-admin, | Triage Stage: Accepted
list_display |
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by olivierdalang):

* cc: olivier.dalang@… (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/10743#comment:7>

Django

unread,
Dec 9, 2021, 2:45:26 PM12/9/21
to django-...@googlegroups.com
#10743: Support lookup separators in ModelAdmin.list_display
-------------------------------------+-------------------------------------
Reporter: mrts | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | Version: dev

Severity: Normal | Resolution:
Keywords: efficient-admin, | Triage Stage: Accepted
list_display |
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Ofer Nave):

I'm eager to have this, and am surprised that it hasn't happened after 13
years.

In the meantime, I'm relying on this very small package which implements a
version of this feature:

https://github.com/PetrDlouhy/django-related-admin/

--
Ticket URL: <https://code.djangoproject.com/ticket/10743#comment:8>

Django

unread,
Dec 9, 2021, 2:45:51 PM12/9/21
to django-...@googlegroups.com
#10743: Support lookup separators in ModelAdmin.list_display
-------------------------------------+-------------------------------------
Reporter: mrts | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: efficient-admin, | Triage Stage: Accepted
list_display |
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Ofer Nave):

* cc: Ofer Nave (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/10743#comment:9>

Django

unread,
Dec 9, 2021, 3:51:12 PM12/9/21
to django-...@googlegroups.com
#10743: Support lookup separators in ModelAdmin.list_display
-------------------------------------+-------------------------------------
Reporter: mrts | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: efficient-admin, | Triage Stage: Accepted
list_display |
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Adam Johnson):

* cc: Adam Johnson (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/10743#comment:10>

Django

unread,
Dec 10, 2021, 2:05:33 PM12/10/21
to django-...@googlegroups.com
#10743: Support lookup separators in ModelAdmin.list_display
-------------------------------------+-------------------------------------
Reporter: mrts | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: efficient-admin, | Triage Stage: Accepted
list_display |
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Egor R):

* cc: Egor R (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/10743#comment:11>

Django

unread,
Apr 5, 2023, 2:55:47 PM4/5/23
to django-...@googlegroups.com
#10743: Support lookup separators in ModelAdmin.list_display
-------------------------------------+-------------------------------------
Reporter: mrts | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: efficient-admin, | Triage Stage: Accepted
list_display |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* needs_docs: 1 => 0
* needs_tests: 1 => 0


Comment:

[https://github.com/django/django/pull/16726 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/10743#comment:12>

Django

unread,
Apr 5, 2023, 2:56:18 PM4/5/23
to django-...@googlegroups.com
#10743: Support lookup separators in ModelAdmin.list_display
-------------------------------------+-------------------------------------
Reporter: mrts | Owner: Alex
| Garcia Ruiz de Oteiza
Type: New feature | Status: assigned

Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: efficient-admin, | Triage Stage: Accepted
list_display |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* owner: nobody => Alex Garcia Ruiz de Oteiza
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/10743#comment:13>

Django

unread,
Apr 10, 2023, 2:16:59 PM4/10/23
to django-...@googlegroups.com
#10743: Support lookup separators in ModelAdmin.list_display
-------------------------------------+-------------------------------------
Reporter: mrts | Owner: Alex
| Garcia Ruiz de Oteiza
Type: New feature | Status: assigned
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: efficient-admin, | Triage Stage: Accepted
list_display |
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 1

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

* needs_better_patch: 0 => 1
* needs_tests: 0 => 1
* needs_docs: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/10743#comment:14>

Django

unread,
Oct 12, 2023, 2:56:34 PM10/12/23
to django-...@googlegroups.com
#10743: Support lookup separators in ModelAdmin.list_display
-------------------------------------+-------------------------------------
Reporter: mrts | Owner: Tom
| Carrick

Type: New feature | Status: assigned
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: efficient-admin, | Triage Stage: Accepted
list_display |
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tom Carrick):

* owner: Alex Garcia Ruiz de Oteiza => Tom Carrick


Comment:

I made a new PR from the old one.

[https://github.com/django/django/pull/17357 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/10743#comment:15>

Django

unread,
Oct 12, 2023, 3:06:59 PM10/12/23
to django-...@googlegroups.com
#10743: Support lookup separators in ModelAdmin.list_display
-------------------------------------+-------------------------------------
Reporter: mrts | Owner: Tom
| Carrick
Type: New feature | Status: assigned
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: efficient-admin, | Triage Stage: Accepted
list_display |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):

* needs_better_patch: 1 => 0


* needs_tests: 1 => 0
* needs_docs: 1 => 0


Comment:

Resetting patch flags so it gets shown in the review queue.

--
Ticket URL: <https://code.djangoproject.com/ticket/10743#comment:16>

Django

unread,
Oct 13, 2023, 3:35:30 PM10/13/23
to django-...@googlegroups.com
#10743: Support lookup separators in ModelAdmin.list_display
-------------------------------------+-------------------------------------
Reporter: mrts | Owner: Tom
| Carrick
Type: New feature | Status: assigned
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: efficient-admin, | Triage Stage: Accepted
list_display |
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):

* needs_better_patch: 0 => 1


* needs_tests: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/10743#comment:17>

Django

unread,
Oct 14, 2023, 12:32:12 PM10/14/23
to django-...@googlegroups.com
#10743: Support lookup separators in ModelAdmin.list_display
-------------------------------------+-------------------------------------
Reporter: mrts | Owner: Tom
| Carrick
Type: New feature | Status: assigned
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: efficient-admin, | Triage Stage: Accepted
list_display |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tom Carrick):

* needs_better_patch: 1 => 0
* needs_tests: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/10743#comment:18>

Django

unread,
Oct 26, 2023, 6:51:48 AM10/26/23
to django-...@googlegroups.com
#10743: Support lookup separators in ModelAdmin.list_display
-------------------------------------+-------------------------------------
Reporter: mrts | Owner: Tom
| Carrick
Type: New feature | Status: assigned
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: efficient-admin, | Triage Stage: Accepted
list_display |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

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

* needs_better_patch: 0 => 1


Comment:

Marking as needs improvement per Natalia's
[https://github.com/django/django/pull/17357#issuecomment-1779734651
comment].

--
Ticket URL: <https://code.djangoproject.com/ticket/10743#comment:19>

Django

unread,
Nov 2, 2023, 1:55:43 PM11/2/23
to django-...@googlegroups.com
#10743: Support lookup separators in ModelAdmin.list_display
-------------------------------------+-------------------------------------
Reporter: mrts | Owner: Tom
| Carrick
Type: New feature | Status: assigned
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: efficient-admin, | Triage Stage: Accepted
list_display |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/10743#comment:20>

Django

unread,
Jan 24, 2024, 1:28:38 PM1/24/24
to django-...@googlegroups.com
#10743: Support lookup separators in ModelAdmin.list_display
-------------------------------------+-------------------------------------
Reporter: mrts | Owner: Tom
| Carrick
Type: New feature | Status: assigned
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: efficient-admin, | Triage Stage: Accepted
list_display |
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):

* needs_better_patch: 0 => 1

* needs_tests: 0 => 1

Comment:

Setting as patch needs improvement following
[https://github.com/django/django/pull/17357#issuecomment-1881676716 this
PR comment] stating that selenium test would be needed for the list
display column ordering.
--
Ticket URL: <https://code.djangoproject.com/ticket/10743#comment:21>

Django

unread,
Jan 30, 2024, 3:46:56 PM1/30/24
to django-...@googlegroups.com
#10743: Support lookup separators in ModelAdmin.list_display
-------------------------------------+-------------------------------------
Reporter: mrts | Owner: Tom
| Carrick
Type: New feature | Status: assigned
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: efficient-admin, | Triage Stage: Accepted
list_display |
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Natalia Bidart):

Selenium test was added and it looks great, I just suggested two unit
tests for the changes in the admin's utils module. Leaving flags as they
are.
--
Ticket URL: <https://code.djangoproject.com/ticket/10743#comment:22>

Django

unread,
Feb 4, 2024, 5:21:39 PM2/4/24
to django-...@googlegroups.com
#10743: Support lookup separators in ModelAdmin.list_display
-------------------------------------+-------------------------------------
Reporter: mrts | Owner: Tom
| Carrick
Type: New feature | Status: assigned
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: efficient-admin, | Triage Stage: Accepted
list_display |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Nina Menezes):

* cc: Nina Menezes (added)


* needs_better_patch: 1 => 0

* needs_tests: 1 => 0

--
Ticket URL: <https://code.djangoproject.com/ticket/10743#comment:23>

Django

unread,
Feb 4, 2024, 6:33:43 PM2/4/24
to django-...@googlegroups.com
#10743: Support lookup separators in ModelAdmin.list_display
-------------------------------------+-------------------------------------
Reporter: mrts | Owner: Tom
| Carrick
Type: New feature | Status: assigned
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: efficient-admin, | Triage Stage: Accepted
list_display |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tom Carrick):

* cc: Tom Carrick (added)

--
Ticket URL: <https://code.djangoproject.com/ticket/10743#comment:24>

Django

unread,
Feb 5, 2024, 6:26:01 PM2/5/24
to django-...@googlegroups.com
#10743: Support lookup separators in ModelAdmin.list_display
-------------------------------------+-------------------------------------
Reporter: mrts | Owner: Tom
| Carrick
Type: New feature | Status: assigned
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: efficient-admin, | Triage Stage: Ready for
list_display | checkin

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

* stage: Accepted => Ready for checkin

--
Ticket URL: <https://code.djangoproject.com/ticket/10743#comment:25>

Django

unread,
Feb 5, 2024, 7:45:08 PM2/5/24
to django-...@googlegroups.com
#10743: Support lookup separators in ModelAdmin.list_display
-------------------------------------+-------------------------------------
Reporter: mrts | Owner: Tom
| Carrick
Type: New feature | Status: closed
Component: contrib.admin | Version: dev
Severity: Normal | Resolution: fixed

Keywords: efficient-admin, | Triage Stage: Ready for
list_display | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia <124304+nessita@…>):

* status: assigned => closed
* resolution: => fixed

Comment:

In [changeset:"4ade8386ebfeb7a781dc2b62542c1cf5f8b9ddaf" 4ade8386]:
{{{#!CommitTicketReference repository=""
revision="4ade8386ebfeb7a781dc2b62542c1cf5f8b9ddaf"
Fixed #10743 -- Allowed lookups for related fields in
ModelAdmin.list_display.

Co-authored-by: Alex Garcia <m...@alexoteiza.com>
Co-authored-by: Natalia <124304+...@users.noreply.github.com>
Co-authored-by: Nina Menezes <https://github.com/nmenezes0>
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/10743#comment:26>

Django

unread,
Feb 5, 2024, 7:45:08 PM2/5/24
to django-...@googlegroups.com
#10743: Support lookup separators in ModelAdmin.list_display
-------------------------------------+-------------------------------------
Reporter: mrts | Owner: Tom
| Carrick
Type: New feature | Status: closed
Component: contrib.admin | Version: dev
Severity: Normal | Resolution: fixed
Keywords: efficient-admin, | Triage Stage: Ready for
list_display | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Natalia <124304+nessita@…>):

In [changeset:"9cefdfc43f0bae696b56fa5a0bf22346f85affff" 9cefdfc]:
{{{#!CommitTicketReference repository=""
revision="9cefdfc43f0bae696b56fa5a0bf22346f85affff"
Refs #10743 -- Enabled ordering for lookups in ModelAdmin.list_display.

Co-authored-by: Natalia <124304+...@users.noreply.github.com>
Co-authored-by: Nina Menezes <https://github.com/nmenezes0>
}}}
--

Ticket URL: <https://code.djangoproject.com/ticket/10743#comment:27>

Django

unread,
Feb 6, 2024, 2:51:03 PM2/6/24
to django-...@googlegroups.com
#10743: Support lookup separators in ModelAdmin.list_display
-------------------------------------+-------------------------------------
Reporter: mrts | Owner: Tom
| Carrick
Type: New feature | Status: closed
Component: contrib.admin | Version: dev
Severity: Normal | Resolution: fixed
Keywords: efficient-admin, | Triage Stage: Ready for
list_display | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by GitHub <noreply@…>):

In [changeset:"3e820d10f81ea9d0576633734c2ebd2621575cbe" 3e820d10]:
{{{#!CommitTicketReference repository=""
revision="3e820d10f81ea9d0576633734c2ebd2621575cbe"
Refs #10743 -- Removed leftover comment in
tests/admin_changelist/tests.py.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/10743#comment:28>

Reply all
Reply to author
Forward
0 new messages