Opened 7 weeks ago

Closed 7 weeks ago

#36063 closed Bug (fixed)

Fields in list_display_links should always navigate to the object "change" page

Reported by: Antoliny Owned by: Antoliny
Component: contrib.admin Version: 5.1
Severity: Normal Keywords: items_for_result, ImageField, FileField
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When fields with links, such as FileField and ImageField, are set in the list_display_links in Django's admin app list page, they do not navigate to the detail page of the corresponding object.

class StockAdmin(ModelAdmin):
    list_display_links = ("file_field",)
    list_display = (
        "email_field",
        "file_field",
        "image_field",
    )


Attachments (2)

file_field_display_err.png (158.8 KB ) - added by Antoliny 7 weeks ago.
file_field_display_err(2).png (158.8 KB ) - added by Antoliny 7 weeks ago.

Download all attachments as: .zip

Change History (10)

comment:1 by Antoliny, 7 weeks ago

Owner: set to Antoliny
Status: newassigned

by Antoliny, 7 weeks ago

Attachment: file_field_display_err.png added

by Antoliny, 7 weeks ago

comment:2 by Antoliny, 7 weeks ago

Has patch: set

comment:3 by Antoliny, 7 weeks ago

comment:4 by Sarah Boyce, 7 weeks ago

Summary: When a field with a link is set in list_display_links(FileField, ImageField), it does not navigate to the detail page.Fields in list_display_links should always navigate to the object "change" page
Triage Stage: UnreviewedAccepted

Thank you!

comment:5 by Sarah Boyce, 7 weeks ago

Patch needs improvement: set

comment:6 by Antoliny, 7 weeks ago

Patch needs improvement: unset

comment:7 by Sarah Boyce, 7 weeks ago

Triage Stage: AcceptedReady for checkin

comment:8 by Sarah Boyce <42296566+sarahboyce@…>, 7 weeks ago

Resolution: fixed
Status: assignedclosed

In a9c79b4:

Fixed #36063 -- Made a FileField navigate to the object admin change page when in list_display_links.

Note: See TracTickets for help on using tickets.
Back to Top