--
Ticket URL: <https://code.djangoproject.com/ticket/25671>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* 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>
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>
Comment (by aaugustin):
Use https://pypi.python.org/pypi/django-modeladmin-reorder/
--
Ticket URL: <https://code.djangoproject.com/ticket/25671#comment:3>
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>
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>
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>
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>
* status: assigned => closed
* resolution: => invalid
--
Ticket URL: <https://code.djangoproject.com/ticket/25671#comment:8>
* 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>
* cc: Olivier Dalang (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/25671#comment:10>
* 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>
* 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>
* owner: Hasan Ramezani => Roman
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/25671#comment:13>
* status: assigned => closed
* resolution: => duplicate
Comment:
Duplicate of #7497.
--
Ticket URL: <https://code.djangoproject.com/ticket/25671#comment:14>