Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#10826 closed (duplicate)

items_for_result() in admin_list.py should be more field type agnostic

Reported by: Joshua Russo Owned by: nobody
Component: contrib.admin Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

It would be helpful to add a format() method to the Field object so that items_for_result() in admin_list.py does not need to be modified when adding a field that needs special formating. The format method would output a formatted string output. If the format method was the fall back for setting the result_repr value in items_for_result() the IF statement could be simplified and my currency objects could be completely standalone without having to modify any Django code.

Change History (2)

comment:1 Changed 7 years ago by Alex Gaynor

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Resolution: duplicate
Status: newclosed

Dupe of #10705.

comment:2 Changed 5 years ago by Jacob

milestone: 1.0.3

Milestone 1.0.3 deleted

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