          Hook for any code that needs to run after everything else in the view.
          """
          # Restore script_prefix.
          set_script_prefix(self.orig_prefix)
  
          # Always add these headers.
          response.headers['Allow'] = ', '.join(self.allowed_methods)
          # sample to allow caching using Vary http header
          response.headers['Vary'] = 'Authenticate, Accept'
  
          # merge with headers possibly set at some point in the view
          response.headers.update(self.headers)
          return self.render(response)
  
      def add_header(self, field, value):
          """
          Add *field* and *value* to the :attr:`headers` attribute of the :class:`View` class.
          """
          self.headers[field] = value
  
      # Note: session based authentication is explicitly CSRF validated,
      # all other authentication is CSRF exempt.
      @csrf_exempt
      def dispatch(self, request, *args, **kwargs):
 
</s> remove         Hook for any code that needs to run after everything else in the view.
 </s> add         Returns an `HttpResponse`. This method is a hook for any code that needs to run
        after everything else in the view. </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         Hook for any code that needs to run prior to anything else.
 </s> add         Returns an `HttpRequest`. This method is a hook for any code that needs to run
        prior to anything else. </s> remove         self.view.DATA  # Make sure our generic parsing runs first
 </s> add         request.DATA  # Make sure our generic parsing runs first </s> remove     def __init__(self, status=200, content=None, headers=None):
        self.status = status
        self.media_type = None
 </s> add     _ACCEPT_QUERY_PARAM = '_accept'        # Allow override of Accept header in URL query params
    _IGNORE_IE_ACCEPT_HEADER = True

    def __init__(self, content=None, status=None, request=None, renderers=None):
        """
        content is the raw content.

        The set of renderers that the response can handle.

        Should be a tuple/list of classes as described in the :mod:`renderers` module.
        """
        # First argument taken by `SimpleTemplateResponse.__init__` is template_name,
        # which we don't need
        super(Response, self).__init__(None, status=status)
        # We need to store our content in raw content to avoid overriding HttpResponse's
        # `content` property
        self.raw_content = content 
        return response
          Hook for any code that needs to run after everything else in the view.
          """
          # Restore script_prefix.
          set_script_prefix(self.orig_prefix)
        return response
        return response
        return response
        return response
        return response
        return response
        return response
        return response
        return response
        return response
        return response
        return response
        return response
        return response
        return response
  
      # Note: session based authentication is explicitly CSRF validated,
      # all other authentication is CSRF exempt.
      @csrf_exempt
      def dispatch(self, request, *args, **kwargs):
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 Response as a subclass of HttpResponse - first draft, not quite there yet. 
djangorestframework/views.py