2

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 going through the pages, the ordering is off.

For instance, if each page had 3 items

  1. Item #1
  2. Item #2
  3. Item #3

While reading page 1, another user updates, then page 2 for the current user will be

  1. Item #3
  2. Item #4
  3. Item #5
killerbarney
  • 947
  • 10
  • 24
  • 1
    If you're storing the date when new items are added you could also additonally filter for the date, so newer items would be excluded! – Bernhard Vallant Sep 30 '10 at 21:45
  • the thing is, I'm using generic views. So I don't think you can have the additional filter. Unless are you talking about making a query first, determining the date of the last post on the page, then using that date to set the query for generic views? – killerbarney Oct 15 '10 at 19:42

1 Answers1

0

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.

Greg
  • 9,963
  • 5
  • 43
  • 46