photocrowd / django-cursor-pagination

Cursor-based pagination for Django
BSD 3-Clause "New" or "Revised" License
158 stars 27 forks source link

Using OrderBy objects does not work #18

Closed Drarok closed 1 year ago

Drarok commented 6 years ago

Since the direction of the sorts are checked assuming they are strings (source), attempting to use an OrderBy object will cause a crash.

The use of an OrderBy object is required in order to change how null values are sorted (source)

qs.order_by(F('field_name').desc(nulls_last=True))
thommor commented 1 year ago

Closing as fixed in #44