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.
Source:stackexchange.com