Customizing Response of Django Rest Framework from Request
Django Rest Framework(DRF) makes it simple to create usual paginated responses for you by just using a ModelSerializer and ModelViewSet. For example, you can easily create a response like this:
{
"count": 23,
"next": null,
"previous...
siddharthpant.hashnode.dev3 min read