Skip to content

Commit 4f3adae

Browse files
committed
Merge branch 'detail-view-sideloading' of https://github.com/namespace-ee/django-rest-framework-sideloading into detail-view-sideloading
2 parents 643896b + fbe29f6 commit 4f3adae

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

drf_sideloading/mixins.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -144,16 +144,6 @@ def initialize_request(self, request, *args, **kwargs):
144144

145145
return request
146146

147-
def create(self, request, *args, **kwargs):
148-
if self.sideloading_query_param_name not in request.query_params:
149-
return super().create(request, *args, **kwargs)
150-
151-
# TODO: correct implementation of creating with sideloading
152-
# create as regular but with sideloaded the response?
153-
# Currently we just pass the post request without sideloading
154-
# raise NotImplementedError("Sideloading for method 'create' has not been implemented")
155-
return super().create(request, *args, **kwargs)
156-
157147
def retrieve(self, request, *args, **kwargs):
158148
if self.sideloading_query_param_name not in request.query_params:
159149
return super().retrieve(request, *args, **kwargs)
@@ -191,21 +181,6 @@ def retrieve(self, request, *args, **kwargs):
191181
)
192182
return Response(serializer.data)
193183

194-
def update(self, request, *args, **kwargs):
195-
if self.sideloading_query_param_name not in request.query_params:
196-
return super().update(request, *args, **kwargs)
197-
raise NotImplementedError("Sideloading for method 'update' has not been implemented")
198-
199-
def partial_update(self, request, *args, **kwargs):
200-
if self.sideloading_query_param_name not in request.query_params:
201-
return super().partial_update(request, *args, **kwargs)
202-
raise NotImplementedError("Sideloading for method 'partial_update' has not been implemented")
203-
204-
def destroy(self, request, *args, **kwargs):
205-
if self.sideloading_query_param_name not in request.query_params:
206-
return super().destroy(request, *args, **kwargs)
207-
raise NotImplementedError("Sideloading for method 'destroy' has not been implemented")
208-
209184
def list(self, request, *args, **kwargs):
210185
if request.method != "GET" or self.sideloading_query_param_name not in request.query_params:
211186
return super().list(request, *args, **kwargs)

0 commit comments

Comments
 (0)