Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8316af2

Browse files
committed
remove workaround per django-json-api#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‎

Lines changed: 1 addition & 12 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /