          # Decimals (force to string representation)
          return str(obj)
      if inspect.isfunction(obj) and not inspect.getargspec(obj)[0]:
          # function with no args
          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())
  
      # fallback
      return smart_unicode(obj, strings_only=True)
  
  
 
</s> remove     # fallback
 </s> add  </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(item) for item in obj.all()]
 </s> add         return [_object_to_data(item, resource) for item in obj.all()] </s> remove         # Currently only supports parsing request body as a stream with 1.3
 </s> add         # NOTE: Currently only supports parsing request body as a stream with 1.3 </s> remove def _form_to_data(form):
 </s> add class BaseResource(object):
        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)
          # Decimals (force to string representation)
          return str(obj)
      if inspect.isfunction(obj) and not inspect.getargspec(obj)[0]:
          # function with no args
        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 _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 _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 _object_to_data(obj(), resource)
    if inspect.ismethod(obj) and len(inspect.getargspec(obj)[0]) <= 1:
        # bound method
        return _object_to_data(obj(), resource)
  
      # fallback
      return smart_unicode(obj, strings_only=True)
  
  
keep keep keep keep replace replace replace replace keep keep keep keep keep
 Sorting out resources.  Doing some crazy magic automatic url resolving stuff.  Yum. 
djangorestframework/resources.py