#29700: Provide an "autocomplete_ordering" value in ModelAdmin, to decouple
autocomplete ordering from admin ordering
------------------------------------------+------------------------
Reporter: David W. Lloyd | Owner: nobody
Type: New feature | Status: new
Component: contrib.admin | Version: 2.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------+------------------------
Reference: https://code.djangoproject.com/ticket/29010#comment:7
The new autocomplete view uses whatever ordering the ModelAdmin specifies,
but most of the time you'd want autocomplete to be alphabetized so that
typeahead suggestions make more sense and can be scanned visually. My
particular use case is that I want certain admins to default to showing
the most recently edited objects, but this sort order makes no sense for
autocomplete views in lookups from related object change forms.
This seems like a common enough use case to warrant built-in decoupling of
sort order for autocomplete view from ModelAdmin's standard "ordering"
field.
Proposed improvement/feature would be an "autocomplete_ordering" field and
corresponding "get_autocomplete_ordering" method which default to using
the "ordering" but can be easily overridden, readily providing decoupling
when needed.
--
Ticket URL: <https://code.djangoproject.com/ticket/29700>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.cf738be453960e6c87eeb93116f60d0e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.