79715036

Date: 2025-07-25 16:40:41
Score: 0.5
Natty:
Report link

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!

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (2): Appreciate your help
  • Whitelisted phrase (-2): I fixed
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Raul Chiarella