code: def update_object(self, request, obj):
          
          try:
              # backbone sends data in the body in json format
                  # Conditional statement is for backwards compatibility with Django <= 1.3
              data = json.loads(request.body if hasattr(request, 'body') else request.raw_post_data)
          except ValueError:
              return HttpResponseBadRequest(_('Unable to parse JSON request body.'))
  
          form = self.get_form_instance(request, data=data, instance=obj)
          if form.is_valid():
              if not self.has_update_permission_for_data(request, form.cleaned_data):
                  return HttpResponseForbidden(_('You do not have permission to perform this action.'))
              form.save()
  
              # We return the updated object details
              return self.get_object_detail(request, obj)
          else:
              return HttpResponseBadRequest(self.json_dumps(form.errors), content_type='application/json')
docs: Updates an object.