          If the :attr:`form` class attribute has been explicitly set then that class will be used
          to create the Form, otherwise the model will be used to create a ModelForm.
          """
  
          if not form and self.model:
              # Fall back to ModelForm which we create on the fly
              class OnTheFlyModelForm(forms.ModelForm):
                  class Meta:
                      model = self.model
 
</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             # 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()
 </s> add             form = OnTheFlyModelForm </s> remove         Given some content return a Django form bound to that content.
        If form validation is turned off (:attr:`form` class attribute is :const:`None`) then returns :const:`None`.
 </s> add         Returns the form class used to validate this resource. </s> remove         return instance
 </s> add         return self.model_instance </s> remove                 instance = model.objects.get(pk=args[-1], **kwargs)
 </s> add                 self.model_instance = model.objects.get(pk=args[-1], **kwargs)
        form = self.get_form_class(method)
          If the :attr:`form` class attribute has been explicitly set then that class will be used
          to create the Form, otherwise the model will be used to create a ModelForm.
          """
        form = self.get_form_class(method)
  
          if not form and self.model:
              # Fall back to ModelForm which we create on the fly
              class OnTheFlyModelForm(forms.ModelForm):
                  class Meta:
                      model = self.model
keep keep add keep 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