[Django]-@detail_route does not work pagination in django rest framework

9👍

Instead of using users_post in your UserSerializer you’ll need to use page:

    if page is not None:
        serializers = UserSerializer(page, many=True, context={'request': request})

Edit:
Note that it should be serializer and not serializers as you only have one serializer.

Leave a comment