Opened 13 years ago

Closed 13 years ago

#2321 closed defect (invalid)

list_display_links (tuple)

Reported by: patrick@… Owned by: Adrian Holovaty
Component: contrib.admin Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


list_display_links = ('title',) works
list_display_links = ('title') does not work

referring to the django-documentation, the final comma should not be necessary
btw: I´m using revision 3309

Change History (1)

comment:1 Changed 13 years ago by Malcolm Tredinnick

Resolution: invalid
Status: newclosed

list_display_links takes a sequence as its argument (just like list_display_filter). I think this is fairly clear from the examples.

In Python ('title') is just a string, whereas ('title',) is a 1-tuple. So the former is not expected to work. If you don't like the trailing comma, ['title'] will also work.

I can't see anywhere in the documentation that we are using the incorrect ('title') format, but, if so, please reopen with a pointer to the place.

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