You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
.The text was updated successfully, but these errors were encountered: