Opened 9 years ago
Closed 3 years ago
#25671 closed New feature (duplicate)
Arrange models and apps order in Admin.
Reported by: | Hasan Ramezani | Owned by: | Roman |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Olivier Dalang | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | yes |
Needs tests: | yes | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | yes |
Description
arrange model in django admin index page
Change History (14)
comment:1 by , 9 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
follow-up: 4 comment:2 by , 9 years ago
Replying to hramezani:
arrange model in django admin index page
In what way you want to arrange models in Admin? Models anyway have been arranged in alphabetical order.
comment:4 by , 9 years ago
Replying to DheerendraRathor:
Replying to hramezani:
arrange model in django admin index page
In what way you want to arrange models in Admin? Models anyway have been arranged in alphabetical order.
add an option to ModelAdmin
that get integer value like this:
order = 1
if order
exists and has a valid integer value, it apply as model order, else previous behaviour(arrange model by name in alphabetical order) applied.
follow-up: 6 comment:5 by , 9 years ago
I'm afraid this API would be quite inconvenient in practice. django-modeladmin-reorder's API feels better.
follow-up: 7 comment:6 by , 9 years ago
Replying to aaugustin:
I'm afraid this API would be quite inconvenient in practice. django-modeladmin-reorder's API feels better.
this request does not change previous model order. model admin can be without order option. ModelAdmin without 'order' option , order same as past(alphabetically order by name). this is optional like another ModelAdmin option.
comment:7 by , 9 years ago
Replying to hramezani:
Replying to aaugustin:
I'm afraid this API would be quite inconvenient in practice. django-modeladmin-reorder's API feels better.
this request does not change previous model order. model admin can be without order option. ModelAdmin without 'order' option , order same as past(alphabetically order by name). this is optional like another ModelAdmin option.
also it is an simple option without need to install new package.
comment:8 by , 9 years ago
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
comment:9 by , 5 years ago
Easy pickings: | set |
---|---|
Has patch: | set |
Resolution: | invalid |
Status: | closed → new |
Version: | 1.8 → master |
Reopening this, as it seems there wasn't really a decision to close it ?
I think it's still relevant. Indeed the django-modeladmin-reorder's API is more powerful and flexible, but also an external dependency and configured in the settings, so not applicable to distributed apps.
Both usage and implementation are very simple, so it's a cheap UX improvement. Compare these lists:
Cities, Continents, Counties, Countries
and Continents, Countries, Counties, Cities
Here's a PR adding a ModelAdmin.order_in_index
option: https://github.com/django/django/pull/12699
comment:10 by , 5 years ago
Cc: | added |
---|
comment:11 by , 5 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
I'm going to say No to this.
The third-party package exists. It's a bit out-of-date, but it could easily be updated. That it's out of date is indicative of a lack of demand for this feature.
Then the Admin API is already too big. Adding another option to ModalAdmin
should at this stage be a last resort.
If a third party app is not desired, I'd much prefer that we document AdminSite.get_app_list()
and have folks override that than opt for more API.
I hope that makes sense.
comment:12 by , 4 years ago
Easy pickings: | unset |
---|---|
Needs documentation: | set |
Needs tests: | set |
Patch needs improvement: | set |
Resolution: | wontfix |
Status: | closed → new |
Summary: | arrange model in django admin index page → Arrange models and apps order in Admin. |
Triage Stage: | Unreviewed → Accepted |
comment:13 by , 4 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Replying to hramezani: