[Django] #25671: arrange model in django admin index page

56 views
Skip to first unread message

Django

unread,
Nov 3, 2015, 9:16:24 AM11/3/15
to django-...@googlegroups.com
#25671: arrange model in django admin index page
-------------------------------+--------------------
Reporter: hramezani | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------+--------------------
arrange model in django admin index page

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

Django

unread,
Nov 3, 2015, 9:21:10 AM11/3/15
to django-...@googlegroups.com
#25671: arrange model in django admin index page
-------------------------------+--------------------------------------
Reporter: hramezani | Owner: hramezani
Type: New feature | Status: assigned
Component: contrib.admin | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 1
-------------------------------+--------------------------------------
Changes (by hramezani):

* owner: nobody => hramezani
* needs_better_patch: => 0
* status: new => assigned
* needs_tests: => 0
* needs_docs: => 0


Comment:

Replying to [ticket:25671 hramezani]:


> arrange model in django admin index page

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

Django

unread,
Nov 3, 2015, 10:02:17 AM11/3/15
to django-...@googlegroups.com
#25671: arrange model in django admin index page
-------------------------------+--------------------------------------
Reporter: hramezani | Owner: hramezani
Type: New feature | Status: assigned
Component: contrib.admin | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 1
-------------------------------+--------------------------------------

Comment (by DheerendraRathor):

Replying to [ticket:25671 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.

--
Ticket URL: <https://code.djangoproject.com/ticket/25671#comment:2>

Django

unread,
Nov 3, 2015, 10:04:29 AM11/3/15
to django-...@googlegroups.com
#25671: arrange model in django admin index page
-------------------------------+--------------------------------------
Reporter: hramezani | Owner: hramezani
Type: New feature | Status: assigned
Component: contrib.admin | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 1
-------------------------------+--------------------------------------

Comment (by aaugustin):

Use https://pypi.python.org/pypi/django-modeladmin-reorder/

--
Ticket URL: <https://code.djangoproject.com/ticket/25671#comment:3>

Django

unread,
Nov 3, 2015, 10:17:02 AM11/3/15
to django-...@googlegroups.com
#25671: arrange model in django admin index page
-------------------------------+--------------------------------------
Reporter: hramezani | Owner: hramezani
Type: New feature | Status: assigned
Component: contrib.admin | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 1
-------------------------------+--------------------------------------

Comment (by hramezani):

Replying to [comment:2 DheerendraRathor]:


> Replying to [ticket:25671 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.

--
Ticket URL: <https://code.djangoproject.com/ticket/25671#comment:4>

Django

unread,
Nov 3, 2015, 12:05:06 PM11/3/15
to django-...@googlegroups.com
#25671: arrange model in django admin index page
-------------------------------+--------------------------------------
Reporter: hramezani | Owner: hramezani
Type: New feature | Status: assigned
Component: contrib.admin | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 1
-------------------------------+--------------------------------------

Comment (by aaugustin):

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

--
Ticket URL: <https://code.djangoproject.com/ticket/25671#comment:5>

Django

unread,
Nov 3, 2015, 12:39:59 PM11/3/15
to django-...@googlegroups.com
#25671: arrange model in django admin index page
-------------------------------+--------------------------------------
Reporter: hramezani | Owner: hramezani
Type: New feature | Status: assigned
Component: contrib.admin | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 1
-------------------------------+--------------------------------------

Comment (by hramezani):

Replying to [comment:5 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.

--
Ticket URL: <https://code.djangoproject.com/ticket/25671#comment:6>

Django

unread,
Nov 3, 2015, 12:41:21 PM11/3/15
to django-...@googlegroups.com
#25671: arrange model in django admin index page
-------------------------------+--------------------------------------
Reporter: hramezani | Owner: hramezani
Type: New feature | Status: assigned
Component: contrib.admin | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 1
-------------------------------+--------------------------------------

Comment (by hramezani):

Replying to [comment:6 hramezani]:


> Replying to [comment:5 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.

--
Ticket URL: <https://code.djangoproject.com/ticket/25671#comment:7>

Django

unread,
Nov 3, 2015, 3:16:41 PM11/3/15
to django-...@googlegroups.com
#25671: arrange model in django admin index page
-------------------------------+--------------------------------------
Reporter: hramezani | Owner: hramezani
Type: New feature | Status: closed
Component: contrib.admin | Version: 1.8
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 1
-------------------------------+--------------------------------------
Changes (by hramezani):

* status: assigned => closed
* resolution: => invalid


--
Ticket URL: <https://code.djangoproject.com/ticket/25671#comment:8>

Django

unread,
Apr 11, 2020, 9:35:49 AM4/11/20
to django-...@googlegroups.com
#25671: arrange model in django admin index page
--------------------------------+------------------------------------------
Reporter: Hasan Ramezani | Owner: Hasan Ramezani

Type: New feature | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
--------------------------------+------------------------------------------
Changes (by Olivier Dalang):

* status: closed => new
* has_patch: 0 => 1
* version: 1.8 => master
* resolution: invalid =>
* easy: 0 => 1


Comment:

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

--
Ticket URL: <https://code.djangoproject.com/ticket/25671#comment:9>

Django

unread,
Apr 11, 2020, 9:37:25 AM4/11/20
to django-...@googlegroups.com
#25671: arrange model in django admin index page
--------------------------------+------------------------------------------
Reporter: Hasan Ramezani | Owner: Hasan Ramezani
Type: New feature | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
--------------------------------+------------------------------------------
Changes (by Olivier Dalang):

* cc: Olivier Dalang (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/25671#comment:10>

Django

unread,
Apr 14, 2020, 3:15:26 AM4/14/20
to django-...@googlegroups.com
#25671: arrange model in django admin index page
--------------------------------+------------------------------------------
Reporter: Hasan Ramezani | Owner: Hasan Ramezani
Type: New feature | Status: closed
Component: contrib.admin | Version: master
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage: Unreviewed

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
--------------------------------+------------------------------------------
Changes (by Carlton Gibson):

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


Comment:

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/25671#comment:11>

Django

unread,
Feb 25, 2021, 1:46:57 AM2/25/21
to django-...@googlegroups.com
#25671: Arrange models and apps order in Admin.

--------------------------------+------------------------------------------
Reporter: Hasan Ramezani | Owner: Hasan Ramezani
Type: New feature | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 1
--------------------------------+------------------------------------------
Changes (by Mariusz Felisiak):

* status: closed => new

* needs_better_patch: 0 => 1
* needs_tests: 0 => 1
* easy: 1 => 0
* needs_docs: 0 => 1
* resolution: wontfix =>
* stage: Unreviewed => Accepted


Comment:

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

[https://github.com/django/django/pull/13918 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/25671#comment:12>

Django

unread,
Feb 25, 2021, 1:47:34 AM2/25/21
to django-...@googlegroups.com
#25671: Arrange models and apps order in Admin.
--------------------------------+------------------------------------
Reporter: Hasan Ramezani | Owner: Roman

Type: New feature | Status: assigned
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 1
--------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* owner: Hasan Ramezani => Roman


* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/25671#comment:13>

Django

unread,
May 17, 2021, 2:39:28 PM5/17/21
to django-...@googlegroups.com
#25671: Arrange models and apps order in Admin.
--------------------------------+-------------------------------------

Reporter: Hasan Ramezani | Owner: Roman
Type: New feature | Status: closed
Component: contrib.admin | Version: dev
Severity: Normal | Resolution: duplicate

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

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


Comment:

Duplicate of #7497.

--
Ticket URL: <https://code.djangoproject.com/ticket/25671#comment:14>

Reply all
Reply to author
Forward
0 new messages