diff options
| author | Tom Christie | 2012-11-16 13:45:27 -0800 |
|---|---|---|
| committer | Tom Christie | 2012-11-16 13:45:27 -0800 |
| commit | 9973cf329a2133a900256b53236348ef3c870842 (patch) | |
| tree | 51dc6ace4f81f6137a2c8249b2ba8f88e8531480 /docs | |
| parent | 8d3581f4bd9b0abbf88a7713a1cb8b67f820602a (diff) | |
| parent | a701a21587a69ed959533cbcfdaa9c63337c3ccc (diff) | |
| download | django-rest-framework-9973cf329a2133a900256b53236348ef3c870842.tar.bz2 | |
Merge pull request #412 from minddust/custom_page_size_per_request
support for custom page size per request
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/api-guide/generic-views.md | 4 | ||||
| -rw-r--r-- | docs/api-guide/settings.md | 10 | ||||
| -rw-r--r-- | docs/topics/release-notes.md | 1 |
3 files changed, 15 insertions, 0 deletions
diff --git a/docs/api-guide/generic-views.md b/docs/api-guide/generic-views.md index 360ef1a2..3346c70a 100644 --- a/docs/api-guide/generic-views.md +++ b/docs/api-guide/generic-views.md @@ -147,6 +147,10 @@ Provides a `.list(request, *args, **kwargs)` method, that implements listing a q Should be mixed in with [MultipleObjectAPIView]. +**Arguments**: + +* `page_size_kwarg` - Allows you to overwrite the global settings `PAGE_SIZE_KWARG` for a specific view. You can also turn it off for a specific view by setting it to `None`. Default is `page_size`. + ## CreateModelMixin Provides a `.create(request, *args, **kwargs)` method, that implements creating and saving a new model instance. diff --git a/docs/api-guide/settings.md b/docs/api-guide/settings.md index 4f87b30d..8fce9e4e 100644 --- a/docs/api-guide/settings.md +++ b/docs/api-guide/settings.md @@ -150,4 +150,14 @@ Default: `'accept'` Default: `'format'` +## PAGE_SIZE_KWARG + +Allows you to globally pass a page size parameter for an individual request. + +The name of the GET parameter of views which inherit ListModelMixin for requesting data with an individual page size. + +If the value if this setting is `None` the passing a page size is turned off by default. + +Default: `'page_size'` + [cite]: http://www.python.org/dev/peps/pep-0020/ diff --git a/docs/topics/release-notes.md b/docs/topics/release-notes.md index 35e8a8b3..85c19f5b 100644 --- a/docs/topics/release-notes.md +++ b/docs/topics/release-notes.md @@ -7,6 +7,7 @@ ## Master * Support for `read_only_fields` on `ModelSerializer` classes. +* Support for individual page sizes per request via `page_size` GET parameter in views which inherit ListModelMixin. ## 2.1.2 |
