Opened 9 years ago

Closed 4 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)

in reply to:  description comment:1 by Hasan Ramezani, 9 years ago

Owner: changed from nobody to Hasan Ramezani
Status: newassigned

Replying to hramezani:

arrange app models in django admin index page

Last edited 9 years ago by Hasan Ramezani (previous) (diff)

in reply to:  description ; comment:2 by Dheerendra Rathor, 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.

in reply to:  2 comment:4 by Hasan Ramezani, 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.

comment:5 by Aymeric Augustin, 9 years ago

I'm afraid this API would be quite inconvenient in practice. django-modeladmin-reorder's API feels better.

in reply to:  5 ; comment:6 by Hasan Ramezani, 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.

in reply to:  6 comment:7 by Hasan Ramezani, 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 Hasan Ramezani, 9 years ago

Resolution: invalid
Status: assignedclosed

comment:9 by Olivier Dalang, 5 years ago

Easy pickings: set
Has patch: set
Resolution: invalid
Status: closednew
Version: 1.8master

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 Olivier Dalang, 5 years ago

Cc: Olivier Dalang added

comment:11 by Carlton Gibson, 5 years ago

Resolution: wontfix
Status: newclosed

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 Mariusz Felisiak, 4 years ago

Easy pickings: unset
Needs documentation: set
Needs tests: set
Patch needs improvement: set
Resolution: wontfix
Status: closednew
Summary: arrange model in django admin index pageArrange models and apps order in Admin.
Triage Stage: UnreviewedAccepted

Using AdminSite.get_app_list() was also proposed in #32482. I think it makes sense.

PR

comment:13 by Mariusz Felisiak, 4 years ago

Owner: changed from Hasan Ramezani to Roman
Status: newassigned

comment:14 by Mariusz Felisiak, 4 years ago

Resolution: duplicate
Status: assignedclosed

Duplicate of #7497.

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