aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/pagination.md
diff options
context:
space:
mode:
authorTom Christie2014-11-25 16:27:00 +0000
committerTom Christie2014-11-25 16:27:00 +0000
commitf13c0ebe69f92ecad7e84257b3baf2ccafe69b3e (patch)
tree5de4f2bcbd973513197c809b301f05f21b9db325 /docs/api-guide/pagination.md
parent8c91e7b742067b6d4e4ed6d476bfe2cf5839ac8b (diff)
parentb733f85ff1e3f70e9f5dee6f52bebe861bc0f411 (diff)
downloaddjango-rest-framework-f13c0ebe69f92ecad7e84257b3baf2ccafe69b3e.tar.bz2
Merge master
Diffstat (limited to 'docs/api-guide/pagination.md')
-rw-r--r--docs/api-guide/pagination.md6
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 @@
>
> &mdash; [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.