              # Prepare response for the response cycle.
              self.prepare_response(response)
  
              # Pre-serialize filtering (eg filter complex objects into natively serializable types)
              # TODO: ugly
              if hasattr(response, 'raw_content'):
                  response.raw_content = self.filter_response(response.raw_content)
              else:
                  response.content = self.filter_response(response.content)
  
 
</s> remove         except ErrorResponse, response:
 </s> add         except ImmediateResponse, response: </s> remove         # TODO: renderer *could* override media_type in .render() if required.
 </s> add  </s> remove         # TODO: must go
        self.view = None
 </s> add  </s> remove     # TODO: wrap this behavior around dispatch(), ensuring it works
    # out of the box with existing Django classes that use render_to_response.
 </s> add  </s> remove # TODO: can't pass because view is a simple Django view and response is an ErrorResponse
#    def test_unsatisfiable_accept_header_on_request_returns_406_status(self):
#        """If the Accept header is unsatisfiable we should return a 406 Not Acceptable response."""
#        resp = self.client.get('/', HTTP_ACCEPT='foo/bar')
#        self.assertEquals(resp.status_code, status.HTTP_406_NOT_ACCEPTABLE)
 </s> add     @unittest.skip('can\'t pass because view is a simple Django view and response is an ImmediateResponse')
    def test_unsatisfiable_accept_header_on_request_returns_406_status(self):
        """If the Accept header is unsatisfiable we should return a 406 Not Acceptable response."""
        resp = self.client.get('/', HTTP_ACCEPT='foo/bar')
        self.assertEquals(resp.status_code, status.HTTP_406_NOT_ACCEPTABLE)
            # TODO: ugly hack to handle both HttpResponse and Response. 
              # Prepare response for the response cycle.
              self.prepare_response(response)
  
              # Pre-serialize filtering (eg filter complex objects into natively serializable types)
            # TODO: ugly hack to handle both HttpResponse and Response. 
              if hasattr(response, 'raw_content'):
                  response.raw_content = self.filter_response(response.raw_content)
              else:
                  response.content = self.filter_response(response.content)
  
keep keep keep keep replace keep keep keep keep keep
 cleaned a bit Response/ResponseMixin code, added some documentation + renamed ErrorResponse to ImmediateResponse 
djangorestframework/views.py