Skip to content

Commit fc52dc4

Browse files
committed
Inherit ModelViewSet and ReadOnlyModelViewSet from RelatedMixin
1 parent 196d8ba commit fc52dc4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

rest_framework_json_api/views.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,16 @@ def get_related_instance(self):
148148
raise NotFound
149149

150150

151-
class ModelViewSet(AutoPrefetchMixin, PrefetchForIncludesHelperMixin, viewsets.ModelViewSet):
151+
class ModelViewSet(AutoPrefetchMixin,
152+
PrefetchForIncludesHelperMixin,
153+
RelatedMixin,
154+
viewsets.ModelViewSet):
152155
pass
153156

154157

155158
class ReadOnlyModelViewSet(AutoPrefetchMixin,
156159
PrefetchForIncludesHelperMixin,
160+
RelatedMixin,
157161
viewsets.ReadOnlyModelViewSet):
158162
pass
159163

0 commit comments

Comments
 (0)