On Fri, May 21, 2010 at 7:38 AM, tiemonster <[email protected]> wrote: > Is there a reason that the default ordering on the User model is by > pk? Would it be a reasonable request to ask that the default ordering > for this model be username? I have several models that have a m2m to > the User model, and it's very hard to find someone to add using the > admin when the users are in pk order. I wanted to test the waters > before opening a ticket.
Actually, the user model's default ordering used to be by username-- but in large deployments, this needlessly caused significant overhead when using the User model. Presuming you have many users, your admins will likely still use the search field to find the user they need. Even so, you could create a custom ModelAdmin for User, specifying the ordering option: http://docs.djangoproject.com/en/1.2/ref/contrib/admin/#django.contrib.admin.ModelAdmin.ordering -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
