Skip to content

Instantly share code, notes, and snippets.

Created Aug 25, 2020
What would you like to do?
# 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