You can change the page_field
in NextPageField
class inside pagination.py
file to permanently change the name from page
to limit
.
For the second part you can write your own custom PaginationSerializer
:
from rest_framework.pagination import BasePaginationSerializer, NextPageField
class MyPaginationSerializer(BasePaginationSerializer):
next = NextPageField(source='*')
Now only the next
and results
field will be returned.