-
Notifications
You must be signed in to change notification settings - Fork 140
Open
Description
I have this code in my DataTableView implementation:
def get_initial_queryset(self):
# Patients Query (NP Exams)
patients = PaymentOption.objects.filter(
pt__user=self.request.user,
deleted=False
).order_by("pt__pk", "-option_accepted", "-pk").distinct("pt__pk")
return patients
It does not matter what I do with the order_by and distinct it will always fail.
I saw that it fails inside get_context_data() function of BaseDatatableView class the line:
self.ordering(qs)
Somehow I made it work by reimplementing the ordering method with the same code but changing the way the request params are retrieved. For example from:
request.REQUEST.get('iSortCol_%s' % i)
to
request.GET.get('iSortCol_%s' % i)
Seems like I'm missing something else but that's what I found
Metadata
Metadata
Assignees
Labels
No labels