#8220: ForeignKey dropdown sorting in Admin
--------------------------------------+-------------------------------------
Reporter: robvdl | Owner: nobody
Status: reopened | Milestone: 1.0 maybe
Component: Admin interface | Version: SVN
Resolution: | Keywords: ForeignKey sort ordering
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
--------------------------------------+-------------------------------------
Changes (by eriks5):
* status: closed => reopened
* resolution: wontfix =>
Comment:
Setting the ordering option is not possible in this case since the User
model is not under our control. In r7806 the default ordering of the User
model was removed causing all select boxes in the admin interface for the
User model to be sorted in database order instead of username order.
In my application there are thousands of users. It is impossible to find a
user if the select box is not sorted by username.
In http://groups.google.com/group/django-
users/browse_thread/thread/8526e0c37293d196 a solution to this problem is
given, but this is really just a hack. In my application I have a dozen
models with a ForeignKey on the User model and had to add that solution to
each model. This is not the DRY principle as we're used with in Django.
--
Ticket URL: <http://code.djangoproject.com/ticket/8220#comment:2>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" 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-updates?hl=en
-~----------~----~----~----~------~----~------~--~---