In the doc, in this section it says to create views like this but won't I need a queryset or get_queryset()defined here? Just want to understand what's happening here. I found a workaround in another issue posted here to use self.filter_queryset_by_parents_lookups.
yourapp.views
from rest_framework_extensions.mixins import NestedViewSetMixin
class UserViewSet(NestedViewSetMixin, ModelViewSet):
model = UserModel
class GroupViewSet(NestedViewSetMixin, ModelViewSet):
model = GroupModel
class PermissionViewSet(NestedViewSetMixin, ModelViewSet):
model = PermissionModel
Nested routes
In the doc, in this section it says to create views like this but won't I need a
queryset
orget_queryset()
defined here? Just want to understand what's happening here. I found a workaround in another issue posted here to useself.filter_queryset_by_parents_lookups
.