Closed adrengifo closed 4 years ago
Sorry for the slow response.
Yeah absolutely. The mixin can be applied to anything that defines self.queryset
and self.serializer_class
There's also some new docs that show you how to use the prefetch
method directly to get the queryset with prefetches applied.
Let me know if this didn't answer your question.
Does this only work with modelviewsets? or can it work with Generic views https://www.django-rest-framework.org/api-guide/generic-views/