I'm using ListAPIView, but I can't filter the results. My code is:
class UserPostReadView(generics.ListAPIView):
serializer_class = PostSerializer
model = serializer_class.Meta.model
queryset = model.objects.order_by('-post_time')
lookup_field = 'poster_id'
paginate_by = 100
In this case, lookup_field
is ignored, but the documentation says that it's supported for this class too. If I try to implement a custom get
over a generic view, I don't know how to reimplement paginate_by
. Any ideas?