                  instance = model.objects.get(**filtered_keywords)
          except model.DoesNotExist:
              raise ErrorResponse(status.HTTP_404_NOT_FOUND)
  
          return instance
  
  
  class CreateModelMixin(object):
      """
      Behavior to create a `model` instance on POST requests
 
</s> remove         instance.save()
        return instance
 </s> add         self.model_instance.save()
        return self.model_instance </s> remove                 instance = model.objects.get(**filtered_keywords)
 </s> add                 self.model_instance = model.objects.get(**filtered_keywords) </s> remove         form = super(ModelResource, self).get_bound_form(data, files, method=method)
        
        # Use an explict Form if it exists
        if form:
            return form

        elif self.model:
 </s> add         if not form and self.model: </s> remove             instance = model(**self.CONTENT)
            instance.save()
 </s> add             self.model_instance = model(**self.CONTENT)
            self.model_instance.save()
        return self.model_instance
                  instance = model.objects.get(**filtered_keywords)
          except model.DoesNotExist:
              raise ErrorResponse(status.HTTP_404_NOT_FOUND)
  
        return self.model_instance
  
  
  class CreateModelMixin(object):
      """
      Behavior to create a `model` instance on POST requests
keep keep keep keep 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