diff options
| author | Tom Christie | 2013-08-29 20:52:46 +0100 |
|---|---|---|
| committer | Tom Christie | 2013-08-29 20:52:46 +0100 |
| commit | 19f9adacb254841d02f43295baf81406ce3c60eb (patch) | |
| tree | f77644b5515c15e09d49d12aef0855c67262f9ba /docs/api-guide/settings.md | |
| parent | e4d2f54529bcf538be93da5770e05b88a32da1c7 (diff) | |
| parent | 02b6836ee88498861521dfff743467b0456ad109 (diff) | |
| download | django-rest-framework-19f9adacb254841d02f43295baf81406ce3c60eb.tar.bz2 | |
Merge branch 'master' into display-raw-data
Diffstat (limited to 'docs/api-guide/settings.md')
| -rw-r--r-- | docs/api-guide/settings.md | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/docs/api-guide/settings.md b/docs/api-guide/settings.md index fe7925a5..542e8c5f 100644 --- a/docs/api-guide/settings.md +++ b/docs/api-guide/settings.md @@ -127,6 +127,35 @@ Default: `None` The name of a query parameter, which can be used by the client to override the default page size to use for pagination. If set to `None`, clients may not override the default page size. +For example, given the following settings: + + REST_FRAMEWORK = { + 'PAGINATE_BY': 10, + 'PAGINATE_BY_PARAM': 'page_size', + } + +A client would be able to modify the pagination size by using the `page_size` query parameter. For example: + + GET http://example.com/api/accounts?page_size=25 + +Default: `None` + +#### MAX_PAGINATE_BY + +The maximum page size to allow when the page size is specified by the client. If set to `None`, then no maximum limit is applied. + +For example, given the following settings: + + REST_FRAMEWORK = { + 'PAGINATE_BY': 10, + 'PAGINATE_BY_PARAM': 'page_size', + 'MAX_PAGINATE_BY': 100 + } + +A client request like the following would return a paginated list of up to 100 items. + + GET http://example.com/api/accounts?page_size=999 + Default: `None` --- |
