          except Http404:
              self.object = None
              created = True
  
          serializer = self.get_serializer(self.object, data=request.DATA, files=request.FILES)
  
          if serializer.is_valid():
              self.pre_save(serializer.object)
              self.object = serializer.save()
              status_code = created and status.HTTP_201_CREATED or status.HTTP_200_OK
 
</s> remove     def update(self, request, *args, **kwargs):
 </s> add     def update(self, request, partial=False, *args, **kwargs): </s> remove     def get_serializer(self, instance=None, data=None, files=None):
 </s> add     def get_serializer(self, instance=None, data=None, files=None, partial=False): </s> remove         return serializer_class(instance, data=data, files=files, context=context)
 </s> add         return serializer_class(instance, data=data, files=files, partial=partial, context=context)
        serializer = self.get_serializer(self.object, data=request.DATA, files=request.FILES, partial=partial)
          except Http404:
              self.object = None
              created = True
  
        serializer = self.get_serializer(self.object, data=request.DATA, files=request.FILES, partial=partial)
  
          if serializer.is_valid():
              self.pre_save(serializer.object)
              self.object = serializer.save()
              status_code = created and status.HTTP_201_CREATED or status.HTTP_200_OK
keep keep keep keep replace keep keep keep keep keep
 Adding PATCH support to Django REST Framework 
rest_framework/mixins.py