          if not form_cls:
              return None
  
          if data is not None:
              return form_cls(data, files)
  
          return form_cls()
  
  
  class ModelResource(FormResource):
 
</s> remove         return form_cls()
 </s> add         return self.form() </s> remove         """Given some content return a Django form bound to that content.
        If form validation is turned off (form class attribute is None) then returns None."""
        form_cls = getattr(self, 'form', None)

        if not form_cls:
 </s> add         """
        Given some content return a Django form bound to that content.
        If form validation is turned off (form class attribute is None) then returns None.
        """
        if not self.form: </s> remove     ret = {}
    for name, field in form.fields.items():
        if not form.is_bound:
            data = form.initial.get(name, field.initial)
            if callable(data):
                data = data()
        else:
            if isinstance(field, FileField) and form.data is None:
                data = form.initial.get(name, field.initial)
            else:
                data = field.widget.value_from_datadict(form.data, form.files, name)
        ret[name] = field.prepare_value(data)
    return ret


class BaseResource(object):
    """Base class for all Resource classes, which simply defines the interface they provide."""
 </s> add     fields = None
    include = None
    exclude = None </s> remove         return _object_to_data(_model_to_dict(obj))
 </s> add         return _object_to_data(_model_to_dict(obj, resource)) </s> remove         return _object_to_data(obj())
    if inspect.ismethod(obj) and len(inspect.getargspec(obj)[0]) == 1:
        # method with only a 'self' args
        return _object_to_data(obj())
 </s> add         return _object_to_data(obj(), resource)
    if inspect.ismethod(obj) and len(inspect.getargspec(obj)[0]) <= 1:
        # bound method
        return _object_to_data(obj(), resource)
            return self.form(data, files)
          if not form_cls:
              return None
  
          if data is not None:
            return self.form(data, files)
  
          return form_cls()
  
  
  class ModelResource(FormResource):
keep keep keep keep replace keep keep keep keep keep
 Sorting out resources.  Doing some crazy magic automatic url resolving stuff.  Yum. 
djangorestframework/resources.py