Closed Bug 1063587 Opened 7 years ago Closed 7 years ago

[Compat Data] Resource collections should be paginated


( Graveyard :: General, enhancement)

Not set


(Not tracked)



(Reporter: jwhitlock, Unassigned)



(Whiteboard: [specification][type:feature])

What problems would this solve?
Resource lists such as will just get longer.  To reduce the network size for casual browsers, these responses should be paginated

Who would use this?
Developers browsing the API

What would users see?
Developers would see the first N resources, and get pagination data including the total number of items, of pages, and the URI for the next and previous paginated sets

What would users do? What would happen as a result?
A developer would look for paginated data.  The API would remain snappy for casual browsers.

Is there anything else we should know?
The planned scheme appears at

Django REST Framework has some built-in pagination support which might be handy, or might get in the way:

As of Sept 5, 2014, the JSON API spec ( does not have pagination recommendations, except that data should appear in the meta section.

Github issue:
Blocks: 1063168
Severity: normal → enhancement
Commits pushed to master at
bug 1063587 - Split "models" from drf_cached_reads

Preparing for adding additional attributes, tests for pagination
bug 1063587 - CachedQueryset pagination

Add count, to get number of items
Add __getitem__, to support slicing
Add tests for .pks property
bug 1063587 - Paginate API list views
bug 1063587 - Update

Empty browsers response contains pagination
bug 1063587 - jslint
bug 1063587 - Browse app supports pagination
bug 1063587 - Add jslint to make qa, if exists
fix bug 1063587 - Use relation count without GETs

The standard way of counting related items is
{{object.children.length}}, but this causes a GET for each child object.
Instead, we use {{}}, which uses the related
ID array contained in the private data attribute.
Closed: 7 years ago
Resolution: --- → FIXED
Product: → Graveyard
You need to log in before you can comment on or make changes to this bug.