          except model.DoesNotExist:
              instance = model(**self.CONTENT)
              instance.save()
  
          instance.save()
          return instance
  
  
  class DeleteModelMixin(object):
      """
      Behavior to delete a `model` instance on DELETE requests
 
</s> remove         return instance
 </s> add         return self.model_instance </s> remove             instance = model(**self.CONTENT)
            instance.save()
 </s> add             self.model_instance = model(**self.CONTENT)
            self.model_instance.save() </s> remove                 setattr(instance, key, val)
 </s> add                 setattr(self.model_instance, key, val) </s> remove                 instance = model.objects.get(**kwargs)
 </s> add                 self.model_instance = model.objects.get(**kwargs) </s> remove                 instance = model.objects.get(**filtered_keywords)
 </s> add                 self.model_instance = model.objects.get(**filtered_keywords)
        self.model_instance.save()
        return self.model_instance
          except model.DoesNotExist:
              instance = model(**self.CONTENT)
              instance.save()
  
        self.model_instance.save()
        return self.model_instance
        self.model_instance.save()
        return self.model_instance
  
  
  class DeleteModelMixin(object):
      """
      Behavior to delete a `model` instance on DELETE requests
keep keep keep keep replace replace keep keep keep keep keep
 FIX: ModelViews can have Resources whose models have unique fields.

ReadModelMixin and UpdateModelMixin store model instance as a property. This allows ModelResource to bind the ModelForm using the model instance making the form validate the input data against the model instance and not a brand new instance. When the latter happened and the model used unique fields, the form validation failed whenever a PUT was maintaining the previuos value of the unique field. 
djangorestframework/mixins.py