backbone-tastypie icon indicating copy to clipboard operation
backbone-tastypie copied to clipboard

Support for fetching arbitrary pages

Open dominicglenn opened this issue 12 years ago • 2 comments

Could you add support to handle fetching arbitrary pages, e.g. fetching page 3 when you've only actually fetched the first page so far; thus skipping page 2 entirely?

dominicglenn avatar Jul 10 '12 20:07 dominicglenn

Yea that could be useful. Is this for handling page numbers from urls/routes? Tastypie's pagination is more like a cursor so i'm cautious about adding "pages" to the api. I'd counter with with the ability to fetch from an arbitrary offset vs. pages. You could then pass the offset to urls.

amccloud avatar Jul 11 '12 02:07 amccloud

Considering that tastypie actually returns the total count of the objects would it not be relatively easy to do bounds checking etc knowing how big each page was?

dominicglenn avatar Jul 11 '12 08:07 dominicglenn