Thanks for the replies!
Turns out the issue was on my side — I had defined CustomOrderPagination
in a separate pagination.py
file but was importing it from a different module that wasn’t actually being used by the ViewSet
.
To debug, I added:
def paginate_queryset(self, queryset):
print("called paginate_queryset")
return super().paginate_queryset(queryset)
But nothing was printed — and that’s when I realized I was assigning a pagination class that wasn't even getting loaded. Once I fixed the import and confirmed the correct pagination class was being used, everything started working as expected.
Appreciate your help — especially the suggestion to override paginate_queryset()
, that helped me track it down 🙌
One of those “it works in one tab, but not in the one you’re testing” moments 😅 Thanks again!