Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use paging queries? #47

Open
lzy350593418 opened this issue Aug 14, 2023 · 1 comment
Open

How to use paging queries? #47

lzy350593418 opened this issue Aug 14, 2023 · 1 comment

Comments

@lzy350593418
Copy link

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
@lzy350593418
Copy link
Author

Oh, i rewrite the List function, paging queries successfully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant