Created
August 25, 2020 06:03
-
-
Save velotiotech/392b271c7ac2ebba12f0ccf7721f048e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Remember to use mixin before the generics | |
class BookListCreateAPIView(DynamicPaginationMixin, generics.ListCreateAPIView): | |
serializer_class = BookSerializer | |
def get_queryset(self): | |
queryset = Book.objects.select_related("author").all() | |
return queryset |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment