Closed AndreyMZ closed 1 year ago
Shall I release it as 2.2?
Thanks for this PR. Actually, I prefer smaller PRs which do not mix up fixes and features and version bumps, but I'm going to merge this anyway.
Shall I release it as 2.2?
I would appreciate it. Thank you!
There are many way in Django to specify an ordering by column:
str
'my_order'
'-my_order'
F
F('my_order')
OrderBy
F('my_order').asc()
F('my_order').desc()
OrderBy
OrderBy(F('my_order'))
OrderBy(F('my_order'), descending=True)
This PR adds support for all this ways. Now one can write:
Also custom
ChangeList.get_ordering
may return instances ofOrderBy
orF
, not onlystr
. Previously this resulted in e.g.:For the rest minor changes see the commit messages.