Skip to content

Commit 8316af2

Browse files
committed
remove workaround per #651
1 parent 40b657e commit 8316af2

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

example/views.py

+1-12
Original file line numberDiff line numberDiff line change
@@ -208,18 +208,7 @@ def get_queryset(self, *args, **kwargs):
208208
return super(CommentViewSet, self).get_queryset()
209209

210210

211-
class TestModelViewSet(PreloadIncludesMixin, RelatedMixin, viewsets.ModelViewSet):
212-
"""
213-
TODO: this is a temporary workaround since AutoPreloadMixin and PreloadIncludesMixin
214-
conflict with each other for polymorphic viewsets.
215-
See https://github.com/django-json-api/django-rest-framework-json-api/pull/643
216-
DJA's views.ModelViewSet has both AutoPreloadMixin and PreloadIncludesMixin.
217-
"""
218-
http_method_names = ['get', 'post', 'patch', 'delete', 'head', 'options']
219-
220-
221-
# class CompanyViewset(PreloadIncludesMixin, viewsets.ModelViewSet):
222-
class CompanyViewset(TestModelViewSet):
211+
class CompanyViewset(ModelViewSet):
223212
queryset = Company.objects.all()
224213
serializer_class = CompanySerializer
225214

0 commit comments

Comments
 (0)