Opened 3 days ago

Last modified 106 minutes ago

#36063 assigned Bug

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: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
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 3 days ago.
file_field_display_err(2).png (158.8 KB ) - added by Antoliny 3 days ago.

Download all attachments as: .zip

Change History (7)

comment:1 by Antoliny, 3 days ago

Owner: set to Antoliny
Status: newassigned

by Antoliny, 3 days ago

Attachment: file_field_display_err.png added

by Antoliny, 3 days ago

comment:2 by Antoliny, 2 days ago

Has patch: set

comment:3 by Antoliny, 2 days ago

comment:4 by Sarah Boyce, 34 hours 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, 106 minutes ago

Patch needs improvement: set
Note: See TracTickets for help on using tickets.
Back to Top