              if field_errors:
                  detail[u'field_errors'] = field_errors
  
          # Return HTTP 400 response (BAD REQUEST)
          raise ErrorResponse(400, detail)
  
      def get_form_class(self, method=None):
          """
          Returns the form class used to validate this resource.
          """
 
</s> remove         return [method.upper() for method in self.http_method_names if hasattr(self, method)]
 </s> add         return allowed_methods(self) </s> remove         raise ErrorResponse(status.HTTP_405_METHOD_NOT_ALLOWED,
                            {'detail': 'Method \'%s\' not allowed on this resource.' % request.method})
 </s> add         raise ErrorResponse(content=
                {'detail': 'Method \'%s\' not allowed on this resource.' % request.method},
            status=status.HTTP_405_METHOD_NOT_ALLOWED) </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() </s> remove 
        try:
            renderer, media_type = self._determine_renderer(self.request)
        except ErrorResponse, exc:
            renderer = self._default_renderer(self)
            media_type = renderer.media_type
            response = exc.response

        # Set the media type of the response
        # Note that the renderer *could* override it in .render() if required.
        response.media_type = renderer.media_type

        # Serialize the response content
        if response.has_content_body:
            content = renderer.render(response.cleaned_content, media_type)
        else:
            content = renderer.render()

        # Build the HTTP Response
        resp = HttpResponse(content, mimetype=response.media_type, status=response.status)
        for (key, val) in response.headers.items():
            resp[key] = val

        return resp

    def _determine_renderer(self, request):
        """
        Determines the appropriate renderer for the output, given the client's 'Accept' header,
        and the :attr:`renderers` set on this class.

        Returns a 2-tuple of `(renderer, media_type)`

        See: RFC 2616, Section 14 - http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
        """

        if self._ACCEPT_QUERY_PARAM and request.GET.get(self._ACCEPT_QUERY_PARAM, None):
            # Use _accept parameter override
            accept_list = [request.GET.get(self._ACCEPT_QUERY_PARAM)]
        elif (self._IGNORE_IE_ACCEPT_HEADER and
              'HTTP_USER_AGENT' in request.META and
              MSIE_USER_AGENT_REGEX.match(request.META['HTTP_USER_AGENT'])):
            # Ignore MSIE's broken accept behavior and do something sensible instead
            accept_list = ['text/html', '*/*']
        elif 'HTTP_ACCEPT' in request.META:
            # Use standard HTTP Accept negotiation
            accept_list = [token.strip() for token in request.META['HTTP_ACCEPT'].split(',')]
        else:
            # No accept header specified
            accept_list = ['*/*']

        # Check the acceptable media types against each renderer,
        # attempting more specific media types first
        # NB. The inner loop here isn't as bad as it first looks :)
        #     Worst case is we're looping over len(accept_list) * len(self.renderers)
        renderers = [renderer_cls(self) for renderer_cls in self.renderers]

        for accepted_media_type_lst in order_by_precedence(accept_list):
            for renderer in renderers:
                for accepted_media_type in accepted_media_type_lst:
                    if renderer.can_handle_response(accepted_media_type):
                        return renderer, accepted_media_type

        # No acceptable renderers were found
        raise ErrorResponse(status.HTTP_406_NOT_ACCEPTABLE,
                                {'detail': 'Could not satisfy the client\'s Accept header',
                                 'available_types': self._rendered_media_types})
 </s> add         return response
        raise ErrorResponse(content=detail, status=400)
              if field_errors:
                  detail[u'field_errors'] = field_errors
  
          # Return HTTP 400 response (BAD REQUEST)
        raise ErrorResponse(content=detail, status=400)
  
      def get_form_class(self, method=None):
          """
          Returns the form class used to validate this resource.
          """
keep keep keep keep replace keep keep keep keep keep
 Response as a subclass of HttpResponse - first draft, not quite there yet. 
djangorestframework/resources.py