Handle extra args and kwargs in all POST endpoints

This fixes compatibility with DRF's versioning
This commit is contained in:
Steven Loria 2017-10-24 20:14:12 -04:00
parent 42d039b473
commit b34250ec94
No known key found for this signature in database
GPG Key ID: 631262B829DDB506

View File

@ -113,7 +113,7 @@ class LogoutView(APIView):
return self.finalize_response(request, response, *args, **kwargs)
def post(self, request):
def post(self, request, *args, **kwargs):
return self.logout(request)
def logout(self, request):
@ -193,7 +193,7 @@ class PasswordResetConfirmView(GenericAPIView):
def dispatch(self, *args, **kwargs):
return super(PasswordResetConfirmView, self).dispatch(*args, **kwargs)
def post(self, request):
def post(self, request, *args, **kwargs):
serializer = self.get_serializer(data=request.data)
serializer.is_valid(raise_exception=True)
serializer.save()
@ -216,7 +216,7 @@ class PasswordChangeView(GenericAPIView):
def dispatch(self, *args, **kwargs):
return super(PasswordChangeView, self).dispatch(*args, **kwargs)
def post(self, request):
def post(self, request, *args, **kwargs):
serializer = self.get_serializer(data=request.data)
serializer.is_valid(raise_exception=True)
serializer.save()