I'm using Django endles-pagination to load the pages in infinite scroll. I also have some filters that filter the data according to the criteria (for eg, price slider filtering according to price). Now when the page loads, the filter right now filters only from the page loaded, though I want it to filter it from all the pages that have been or are to be loaded. Is there a way to do this (by making some ajax request or something)?
Any help on this would be great. Thanks a lot.
To filter the data you have to redefine
get_queryset()
method in the views requesting the filtered query.For example I request the current language in template to filter the Blog posts based on the language:
To filter the queryset based on the users input, you may refer to POST method:
The endless pagination should work fine.