              else:
                  response = Response(status.HTTP_204_NO_CONTENT)
  
              # Pre-serialize filtering (eg filter complex objects into natively serializable types)
              response.cleaned_content = self.object_to_data(response.raw_content)
      
          except ErrorResponse, exc:
              response = exc.response
  
          # Always add these headers.
 
</s> remove         return resource.validate(self.DATA, self.FILES)
 </s> add         return resource.validate_request(data, files)

    def filter_response(self, obj):
        """
        Given the response content, filter it into a serializable object.
        """
        resource = self.resource(self)
        return resource.filter_response(obj) </s> remove     def object_to_data(self, obj):
        return _object_to_data(obj)
 </s> add     def filter_response(self, obj):
        """
        Given the response content, filter it into a serializable object.
        """
        return _object_to_data(obj, self) </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     """Handles incoming requests and maps them to REST operations.
    Performs request deserialization, response serialization, authentication and input validation."""
 </s> add     """
    Handles incoming requests and maps them to REST operations.
    Performs request deserialization, response serialization, authentication and input validation.
    """
            response.cleaned_content = self.filter_response(response.raw_content)
              else:
                  response = Response(status.HTTP_204_NO_CONTENT)
  
              # Pre-serialize filtering (eg filter complex objects into natively serializable types)
            response.cleaned_content = self.filter_response(response.raw_content)
      
          except ErrorResponse, exc:
              response = exc.response
  
          # Always add these headers.
keep keep keep keep replace keep keep keep keep keep
 Sorting out resources.  Doing some crazy magic automatic url resolving stuff.  Yum. 
djangorestframework/views.py