          if form is not None:
              field_name_types = {}
              for name, field in form.fields.iteritems():
                  field_name_types[name] = field.__class__.__name__
              response_obj['fields'] = field_name_types
          # Note 'ErrorResponse' is misleading, it's just any response
          # that should be rendered and returned immediately, without any
          # response filtering.
          raise ErrorResponse(status.HTTP_200_OK, response_obj)
  
 
</s> remove         raise ErrorResponse(status.HTTP_200_OK, response_obj)
 </s> add         raise ErrorResponse(content=content, status=status.HTTP_200_OK) </s> remove         format = self.view.kwargs.get(self._FORMAT_QUERY_PARAM, None)
        if format is None:
 </s> add         # TODO: format overriding must go out of here
        format = None
        if self.view is not None:
            format = self.view.kwargs.get(self._FORMAT_QUERY_PARAM, None)
        if format is None and self.view is not None: </s> remove             response_obj = handler(request, *args, **kwargs)

            # Allow return value to be either HttpResponse, Response, or an object, or None
            if isinstance(response_obj, HttpResponse):
                return response_obj
            elif isinstance(response_obj, Response):
                response = response_obj
            elif response_obj is not None:
                response = Response(status.HTTP_200_OK, response_obj)
            else:
                response = Response(status.HTTP_204_NO_CONTENT)
 </s> add             # TODO: should we enforce HttpResponse, like Django does ?
            response = handler(request, *args, **kwargs)

            # Prepare response for the response cycle.
            self.prepare_response(response) </s> remove     # TODO: wrap this behavior around dispatch(), ensuring it works
    # out of the box with existing Django classes that use render_to_response.
    def render(self, response):
        """
        Takes a :obj:`Response` object and returns an :obj:`HttpResponse`.
        """
 </s> add     response_class = Response

    def prepare_response(self, response):
        """
        Prepares response for the response cycle. Sets some headers, sets renderers, ...
        """
        if hasattr(response, 'request') and response.request is None:
            response.request = self.request
        # Always add these headers.
        response['Allow'] = ', '.join(allowed_methods(self))
        # sample to allow caching using Vary http header
        response['Vary'] = 'Authenticate, Accept'
        # merge with headers possibly set at some point in the view
        for name, value in self.headers.items():
            response[name] = value
        # set the views renderers on the response
        response.renderers = self.renderers
        # TODO: must disappear
        response.view = self </s> remove         self.raw_content = content      # content prior to filtering
        self.cleaned_content = content  # content after filtering
        self.headers = headers or {}
 </s> add         self.request = request
        if renderers is not None:
            self.renderers = renderers
        # TODO: must go
        self.view = None

    # TODO: wrap this behavior around dispatch(), ensuring it works
    # out of the box with existing Django classes that use render_to_response.
    @property
    def rendered_content(self):
        """
        """
        renderer, media_type = self._determine_renderer()
        # TODO: renderer *could* override media_type in .render() if required.

        # Set the media type of the response
        self['Content-Type'] = renderer.media_type

        # Render the response content
        if self.has_content_body:
            return renderer.render(self.raw_content, media_type)
        return renderer.render()
            content['fields'] = field_name_types
          if form is not None:
              field_name_types = {}
              for name, field in form.fields.iteritems():
                  field_name_types[name] = field.__class__.__name__
            content['fields'] = field_name_types
          # Note 'ErrorResponse' is misleading, it's just any response
          # that should be rendered and returned immediately, without any
          # response filtering.
          raise ErrorResponse(status.HTTP_200_OK, response_obj)
  
keep keep keep keep replace keep keep keep keep keep
 Response as a subclass of HttpResponse - first draft, not quite there yet. 
djangorestframework/views.py