[Django] #32482: Overriding model and/or application order in Admin application is complex and incosistent

12 views
Skip to first unread message

Django

unread,
Feb 24, 2021, 11:56:08 AM2/24/21
to django-...@googlegroups.com
#32482: Overriding model and/or application order in Admin application is complex
and incosistent
------------------------------------------------+------------------------
Reporter: Roman | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.admin | Version: 3.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
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.

--
Ticket URL: <https://code.djangoproject.com/ticket/32482>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Feb 25, 2021, 1:48:02 AM2/25/21
to django-...@googlegroups.com
#32482: Overriding model and/or application order in Admin application is complex
and incosistent
-------------------------------------+-------------------------------------
Reporter: Roman | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: contrib.admin | Version: 3.1
Severity: Normal | Resolution: duplicate

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* resolution: => duplicate


Comment:

Duplicate of #25671, see
[https://code.djangoproject.com/ticket/25671#comment:12 comment].

--
Ticket URL: <https://code.djangoproject.com/ticket/32482#comment:1>

Reply all
Reply to author
Forward
0 new messages