Turn off automatic pagination of Django Rest Framework ModelViewSet

If you are using recent versions of DRF you just need to add pagination_class = None to your ModelViewSet definition.

class MyClassBasedView(ModelViewSet):
    pagination_class = None
    ...

You can also see some tips here https://github.com/tomchristie/django-rest-framework/issues/1390

Leave a Comment