Skip to content

Commit b8badf8

Browse files
James LinJames Lin
authored andcommitted
updated readme
1 parent 1a91959 commit b8badf8

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ class ListDataView(ListView):
4949
```
5050

5151
## Dependencies
52-
The queryset is dependent on the API that uses [LimiteOffsetPagination](http://www.django-rest-framework.org/api-guide/pagination/#limitoffsetpagination)
52+
The queryset is dependent on the API that uses [LimitOffsetPagination](http://www.django-rest-framework.org/api-guide/pagination/#limitoffsetpagination)
53+
54+
In this project, it provides a HybridPagination class, which will swap to `LimitOffsetPagination` when it sees `limit` or `offset` query params,
55+
so that if you are currently using `PageNumberPagination` then you can swap it
56+
with `rest_framework_queryset.pagination.HybridPagination` to achieve both purposes. This feature is experimental, so please report any problems.
5357

5458
## Compatibility
5559
- Python 2

rest_framework_queryset/pagination.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class HybridPagination(PageNumberPagination):
99
By default it uses the PageNumberPagination
1010
When 'offset' is used in request.GET, it will switch to use LimitOffsetPagination
1111
"""
12-
page_size = 2
12+
page_size = 10
1313
default_limit = 1
1414

1515
def __init__(self, *args, **kwargs):

0 commit comments

Comments
 (0)