Question

The default pagination for Django Endless Pagination(which is working perfect for me) shows the oldest object first and then pagniates through newer ones i.e, the last page contains the newest object. I am trying to use this to paginate comments and would like to show the newest comments first and then paginate through the older ones (like on Facebook). To me, it seems a pretty standard ask, but I haven't been able to find any solutions. Any help would be appreciated.

Was it helpful?

Solution

Without any code, it's tough to give you a concrete solution, but the general it will order things however the queryset happens to be ordered. Just use order_by in your query in your view to sort it however you desire.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top