#9285 closed (duplicate)
Admin options in models.py
| Reported by: | Camron Flanders | Owned by: | nobody |
|---|---|---|---|
| Component: | Contrib apps | Version: | dev |
| Severity: | Keywords: | admin models | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
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',),}
#8054 covers the same ground.