#31975: admin_order_field in ModelAdmin doesn't support sorting on multiple
columns
-------------------------------------+-------------------------------------
Reporter: Petr DlouhĂ˝ | Owner: nobody
Type: Uncategorized | Status: closed
Component: contrib.admin | Version: 3.1
Severity: Normal | Resolution: invalid
Keywords: admin_order_field, | Triage Stage:
ModelAdmin | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Petr DlouhĂ˝):
@Mariusz Felisiak You cannot achieve the intended behaviour by that
`Concat`, because
a) I wanted to sort the number in reverse order
b) The length and content of the concatenated strings can vary.
I spend quite some time figuring up that concatenate function, until
finally I gave up.
So I think, this is valid use case for feature request, because the
concatenation is either not possible at all, or it would be quite complex
and very unreadable code.
I looked at the `ChangeList.get_ordering()` function, and since it returns
ordering list it might be quite simple code.
--
Ticket URL: <https://code.djangoproject.com/ticket/31975#comment:3>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/068.609c3c7d7de09ef80280fcb9dc979a36%40djangoproject.com.