`Group.objects.filter(user=user.id)`
Can a default ordering be set somehow to prevent this warning?
Thanks,
Denise
--
Ticket URL: <https://code.djangoproject.com/ticket/28220>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by Simon Charette):
Defining a default ordering coud break existing application and would most
likely require a migration for the `_meta.ordering` change.
The only paginated use of `Group`'s manager is through `GroupAdmin` which
is
[https://github.com/django/django/blob/650bf6714d5648811a8bc08ce53b7fa86cc38d40/django/contrib/auth/admin.py#L29
already ordered] by `name`.
Is there a reason you can't explicitly specify an ordering when exposing
groups through a paginated view by using `order_by()`?
--
Ticket URL: <https://code.djangoproject.com/ticket/28220#comment:1>
* status: new => closed
* component: Uncategorized => contrib.auth
* resolution: => wontfix
* type: Uncategorized => Cleanup/optimization
--
Ticket URL: <https://code.djangoproject.com/ticket/28220#comment:2>
Comment (by Denise Mauldin):
Will do. Just was hoping there was a faster way than updating all of our
code. Thanks.
Replying to [comment:1 Simon Charette]:
> Defining a default ordering coud break existing application and would
most likely require a migration for the `_meta.ordering` change.
>
> The only paginated use of `Group`'s manager is through `GroupAdmin`
which is
[https://github.com/django/django/blob/650bf6714d5648811a8bc08ce53b7fa86cc38d40/django/contrib/auth/admin.py#L29
already ordered] by `name`.
>
> Is there a reason you can't explicitly specify an ordering when exposing
groups through a paginated view by using `order_by()`?
--
Ticket URL: <https://code.djangoproject.com/ticket/28220#comment:3>