Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#9285 closed (duplicate)

Admin options in models.py

Reported by: Camron Flanders Owned by: nobody
Component: Contrib apps Version: master
Severity: Keywords: admin models
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Even with the seperation of admin/models we still have admin related options in models.py. list_display can accept options such as allow_tags, boolean, admin_order_field, ... I feel like I missing one. But these are attributes of the methods on a model.

How about moving this to the admin definition? Maybe using a tuple for fields we want to apply an option, or options to?

Maybe something like:

list_display = ('__unicode__', 'city', ('geocoded', 'boolean'),)

or even

list_display_options = {'boolean': ('geocoded',), 'admin_order_field': ('city',),}

Change History (2)

comment:1 Changed 8 years ago by Karen Tracey

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

#8054 covers the same ground.

comment:2 Changed 8 years ago by (none)

milestone: post-1.0

Milestone post-1.0 deleted

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