I don't know if I am not using NestedViewSetMixin properly but queryset filter with parent_lookup__id doesn't work with ModelViewSet's custom actions.
The filter works properly when used in ListModelMixin's list action override, but when used in similar way with custom actions, the filter doesn't seem to work at all.
Here is a simple use case of mine:
class School(models.Model):
name = models.CharField(max_length=100)
class Student(models.Model):
school = models.ForeignKey(School)
name = models.CharField(max_length=100)
I don't know if I am not using
NestedViewSetMixin
properly but queryset filter withparent_lookup__id
doesn't work with ModelViewSet's custom actions.The filter works properly when used in
ListModelMixin
's list action override, but when used in similar way with custom actions, the filter doesn't seem to work at all.Here is a simple use case of mine:
Is it because of something I have been doing wrong, or is it intended action?