What is the correct way to use paginate_by
with django-filter
in a class based view that extends a FilterView
?
Standard way as bull-in django CBV.
Example with django-filters https://github.com/watchdogpolska/poradnia/blob/e5eb5ea8a82c389bdc09a275bef46480d4156da4/poradnia/advicer/views.py#L31 , https://github.com/watchdogpolska/poradnia/blob/e5eb5ea8a82c389bdc09a275bef46480d4156da4/poradnia/advicer/templates/advicer/advice_filter.html#L50 .
Note that do you have page_obj
from django.views.generic.lis.MultipleObjectMixin
, so read http://ccbv.co.uk/projects/Django/1.9/django.views.generic.list/MultipleObjectMixin/ .
Most helpful comment
Standard way as bull-in django CBV.
Example with django-filters https://github.com/watchdogpolska/poradnia/blob/e5eb5ea8a82c389bdc09a275bef46480d4156da4/poradnia/advicer/views.py#L31 , https://github.com/watchdogpolska/poradnia/blob/e5eb5ea8a82c389bdc09a275bef46480d4156da4/poradnia/advicer/templates/advicer/advice_filter.html#L50 .
Note that do you have
page_obj
fromdjango.views.generic.lis.MultipleObjectMixin
, so read http://ccbv.co.uk/projects/Django/1.9/django.views.generic.list/MultipleObjectMixin/ .