mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-26 08:00:07 +03:00
Update docs/api-guide/pagination.md
If you use the default pagination settings, but for a specific view you don't want to have the pagination, it might be handy to know setting paginate_by to 0 will tutn pagination off for this particular view.
This commit is contained in:
parent
8a4e2c1725
commit
a1fca49c2c
|
@ -96,9 +96,12 @@ You can also set the pagination style on a per-view basis, using the `ListAPIVie
|
|||
model = ExampleModel
|
||||
paginate_by = 10
|
||||
paginate_by_param = 'page_size'
|
||||
Note: to override the default pagination settings on a per-view basis, using 'paginate_by = 0' will turn off the pagination for this view
|
||||
|
||||
For more complex requirements such as serialization that differs depending on the requested media type you can override the `.get_paginate_by()` and `.get_pagination_serializer_class()` methods.
|
||||
|
||||
|
||||
|
||||
---
|
||||
|
||||
# Custom pagination serializers
|
||||
|
|
Loading…
Reference in New Issue
Block a user