diff options
| author | Tom Christie | 2014-11-25 15:52:36 +0000 |
|---|---|---|
| committer | Tom Christie | 2014-11-25 15:52:36 +0000 |
| commit | d7f8047addaea10b0f629e064a3826e7531d8040 (patch) | |
| tree | 9bd27d74390b313bd1b84a9853531e5814ea24e5 /docs/api-guide/pagination.md | |
| parent | 64d8e3dcb6846610e1908e067962b0c8457a86f8 (diff) | |
| parent | 66fc51de5c4622073e7e6cfd12cc7c4a1a8ba60c (diff) | |
| download | django-rest-framework-d7f8047addaea10b0f629e064a3826e7531d8040.tar.bz2 | |
Merge branch 'mkdocs' of git://github.com/d0ugal/django-rest-framework into d0ugal-mkdocs
Diffstat (limited to 'docs/api-guide/pagination.md')
| -rw-r--r-- | docs/api-guide/pagination.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/api-guide/pagination.md b/docs/api-guide/pagination.md index e57aed1a..9b7086c5 100644 --- a/docs/api-guide/pagination.md +++ b/docs/api-guide/pagination.md @@ -1,4 +1,4 @@ -<a class="github" href="pagination.py"></a> +source: pagination.py # Pagination @@ -6,7 +6,7 @@ > > — [Django documentation][cite] -REST framework includes a `PaginationSerializer` class that makes it easy to return paginated data in a way that can then be rendered to arbitrary media types. +REST framework includes a `PaginationSerializer` class that makes it easy to return paginated data in a way that can then be rendered to arbitrary media types. ## Paginating basic data @@ -33,7 +33,7 @@ The `context` argument of the `PaginationSerializer` class may optionally includ request = RequestFactory().get('/foobar') serializer = PaginationSerializer(instance=page, context={'request': request}) serializer.data - # {'count': 4, 'next': 'http://testserver/foobar?page=2', 'previous': None, 'results': [u'john', u'paul']} + # {'count': 4, 'next': 'http://testserver/foobar?page=2', 'previous': None, 'results': [u'john', u'paul']} We could now return that data in a `Response` object, and it would be rendered into the correct media type. |
