I love the ease of django's pagination system, but is there anyway to tweak it where it's paginating by item id instead of page number? Because I am ordering in descending order, if there is an update on a page while a user is goi开发者_如何转开发ng through the pages, the ordering is off.
For instance, if each page had 3 items
- Item #1
- Item #2
- Item #3
While reading page 1, another user updates, then page 2 for the current user will be
- Item #3
- Item #4
- Item #5
Short answer: No.
To do this you'll need to write your own pagination system; Django's is designed to work with any list-like set of data and the page number system is intractably built in.
精彩评论