                  class Meta:
                      model = self.model
                      #fields = tuple(self._model_fields_set)
  
              # Instantiate the ModelForm as appropriate
              if data and isinstance(data, models.Model):
                  # Bound to an existing model instance
                  return OnTheFlyModelForm(instance=content)
              elif data is not None:
                  return OnTheFlyModelForm(data, files)
              return OnTheFlyModelForm()
  
          # Both form and model not set?  Okay bruv, whatevs...
          return None
      
  
 
</s> remove         return None
    
 </s> add         if not form:
            return None

        # Instantiate the ModelForm as appropriate
        if data is not None or files is not None:
            if issubclass(form, forms.ModelForm) and hasattr(self.view, 'model_instance'):
                # Bound to an existing model instance
                return form(data, files, instance=self.view.model_instance)
            else:
                return form(data, files)

        return form()
 </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.objects.get(**filtered_keywords)
 </s> add                 self.model_instance = model.objects.get(**filtered_keywords)
            form = OnTheFlyModelForm
                  class Meta:
                      model = self.model
                      #fields = tuple(self._model_fields_set)
  
            form = OnTheFlyModelForm
            form = OnTheFlyModelForm
            form = OnTheFlyModelForm
            form = OnTheFlyModelForm
            form = OnTheFlyModelForm
            form = OnTheFlyModelForm
            form = OnTheFlyModelForm
  
          # Both form and model not set?  Okay bruv, whatevs...
          return None
      
  
keep keep keep keep replace replace replace replace replace 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/resources.py