class ListModelMixin:
def List(self, request, context):
"""
List a queryset. This sends a sequence of messages of
serializer.Meta.proto_class to the client.
.. note::
This is a server streaming RPC.
"""
queryset = self.filter_queryset(self.get_queryset())
serializer = self.get_serializer(queryset, many=True)
for message in serializer.message:
yield message
class ListModelMixin: def List(self, request, context): """ List a queryset. This sends a sequence of messages of
serializer.Meta.proto_class
to the client.