Opened 4 years ago

Closed 4 years ago

#32482 closed Cleanup/optimization (duplicate)

Overriding model and/or application order in Admin application is complex and incosistent

Reported by: Roman Owned by: nobody
Component: contrib.admin Version: 3.1
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

Description

Sometimes model names are so unfortunate that default alphabetical order of models in contrib.admin application makes no sense at all.
The same applies to applications themselves. When there are many applications or many models within application there is a natural need to group them up logically.

Reordering of models is covered in many online resources, but the very process is so inconsistent and complex, that few get it right.

For instance this one: https://jamiecounsell.me/sort-apps-in-the-django-admin/ does not address ordering in app_index.
Neither does this one: https://books.agiliq.com/projects/django-admin-cookbook/en/latest/set_ordering.html
Even if we put aside incompleteness, both methods seem like too much hustle for such simple task.

I propose to modify index, app_index and get_app_list in such way that overriding of only get_app_list will be enough to reorder models.

I propose a patch for this improvement: https://github.com/django/django/pull/13918

After applying this patch overriding of get_app_list only will be enough to reorder models in index and app_index in a simple and consistent way.

Change History (1)

comment:1 by Mariusz Felisiak, 4 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #25671, see comment.

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