CursorPaginator takes 2 parameters queryset and ordering and applies the ordering to the queryset on init.
However, if a query set is already adequately ordered for pagination purposes, either explicitly or on the model's Meta class, it would be convenient to be able to infer and user that ordering and to call CursorPaginator with a single queryset argument.
CursorPaginator
takes 2 parametersqueryset
andordering
and applies theordering
to thequeryset
on init.However, if a query set is already adequately ordered for pagination purposes, either explicitly or on the model's
Meta
class, it would be convenient to be able to infer and user that ordering and to callCursorPaginator
with a singlequeryset
argument.For example: