You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
First of all, thank you for creating this framework. It saved me a lot of time integrating datatables with django, especially since I have only been working in diango for 6 months!
The problem I encountered, which is not standardly supported by datatables, is that I needed to create a filter for two numeric values on one column ( less/greater than specified ) .
The problem I've encountered is that datatables now incorrectly calculates the number of pages, as if it didn't take into account that my filter was reducing the number of results
have some sort of same problem here.
Im appending params in the Ajax query. They do filter the data but are not being recognized by the pagination classes. Thinking because of are not send in the col[] format
What I tend to do is to perform that filter in the view/viewset rather than in the filter, that way it's already been applied to the queryset before the queryset is passed into the filter
If you do that you should find it resolves your issue
The method you want to overloads will be either get_queryset, which is where I tend to do it, or filter_queryset.
Hi,
First of all, thank you for creating this framework. It saved me a lot of time integrating datatables with django, especially since I have only been working in diango for 6 months!
The problem I encountered, which is not standardly supported by datatables, is that I needed to create a filter for two numeric values on one column ( less/greater than specified ) .
After reading the documentation:
https://django-rest-framework-datatables.readthedocs.io/en/latest/tutorial.html#filtering
I decided to create my own filter backend.
The problem I've encountered is that datatables now incorrectly calculates the number of pages, as if it didn't take into account that my filter was reducing the number of results
my ViewSet:
And my CustomDatatablesFilterBackend:
The text was updated successfully, but these errors were encountered: