문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top