-
-
Notifications
You must be signed in to change notification settings - Fork 33
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 make Paginated response from queryset ? #195
Comments
@Elixir-MeetThoriya you can make your API function by return paginated response by returning PaginatedResponseSchema instance ...
items = list(self.mode.objects.all()
return PaginatedResponseSchema[CountrySchema](count=len(items), results=items, next=None, previous=None) |
@eadwinCode i know this way but pagination not work. please give me another way which use default paginate/pagination functionality.
|
Hiiii @eadwinCode
this is my list api ..
default pagination class = from ninja_extra.pagination import PageNumberPaginationExtra
i need to send condition base response (paginated or non-paginated)
so in my list api-function how to make a paginated response, without using "@paginate" decorator.
The text was updated successfully, but these errors were encountered: