I have a listview using the generic class based ListView. I have get_queryset overloaded in my view:
class WebsiteList(ListView):
model = Website
def get_queryset(self):
return Website.objects.all()
First step is to add the tables2 mixin as follows:
class WebsiteList(tables.SingleTableMixin, ListView):
model = Website
table_class = WebsiteTable #tables2 related
def get_queryset(self):
return Website.objects.all()
The mixin adds the table object to the context and adds an order_by clause to the queryset.
Now i don't know how to add a second mixin for django-filter; i have a mixin available but since it also fetches the queryset from get_queryset i'm expecting that either the ordering or the filtering won't work!?
Anyone with mixin experience willing to give some directions?
Paul