Opened 5 years ago

Closed 4 months ago

#25671 closed New feature (wontfix)

arrange model in django admin index page

Reported by: Hasan Ramezani Owned by: Hasan Ramezani
Component: contrib.admin Version: master
Severity: Normal Keywords:
Cc: Olivier Dalang Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: yes

Description

arrange model in django admin index page

Change History (11)

comment:1 in reply to:  description Changed 5 years ago by Hasan Ramezani

Owner: changed from nobody to Hasan Ramezani
Status: newassigned

Replying to hramezani:

arrange app models in django admin index page

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

comment:2 in reply to:  description ; Changed 5 years ago by Dheerendra Rathor

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 in reply to:  2 Changed 5 years ago by Hasan Ramezani

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 Changed 5 years ago by Aymeric Augustin

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

comment:6 in reply to:  5 ; Changed 5 years ago by Hasan Ramezani

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 in reply to:  6 Changed 5 years ago by Hasan Ramezani

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 Changed 5 years ago by Hasan Ramezani

Resolution: invalid
Status: assignedclosed

comment:9 Changed 4 months ago by Olivier Dalang

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 Changed 4 months ago by Olivier Dalang

Cc: Olivier Dalang added

comment:11 Changed 4 months ago by Carlton Gibson

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.

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