          request = self.initialize_request(request, *args, **kwargs)
          self.request = request
          self.args = args
          self.kwargs = kwargs
          self.headers = self.default_response_headers
  
          try:
              self.initial(request, *args, **kwargs)
  
              # Get the appropriate handler method
 
</s> remove         content = self.get_content(view, request, data, accepted_media_type)
 </s> add         view = renderer_context['view']
        request = renderer_context['request']
        response = renderer_context['response']

        renderer = self.get_default_renderer(view)
        content = self.get_content(renderer, data, accepted_media_type, renderer_context) </s> remove         params = self.view.request.GET
 </s> add         request = renderer_context.get('request', None)
        params = request and request.GET or {} </s> remove         view = self.view
        request = view.request
        response = view.response
 </s> add         accepted_media_type = accepted_media_type or ''
        renderer_context = renderer_context or {} </s> remove         view = self.view
        request, response = view.request, view.response
 </s> add         renderer_context = renderer_context or {}
        view = renderer_context['view']
        request = renderer_context['request']
        response = renderer_context['response'] </s> remove         # If the media type looks like 'application/json; indent=4', then
        # pretty print the result.
        indent = get_media_type_params(accepted_media_type).get('indent', None)
        sort_keys = False
        try:
            indent = max(min(int(indent), 8), 0)
            sort_keys = True
        except (ValueError, TypeError):
            indent = None
 </s> add         # If 'indent' is provided in the context, then pretty print the result.
        # E.g. If we're being called by the BrowseableAPIRenderer.
        renderer_context = renderer_context or {}
        indent = renderer_context.get('indent', None)
        sort_keys = indent and True or False

        if accepted_media_type:
            # If the media type looks like 'application/json; indent=4',
            # then pretty print the result.
            params = get_media_type_params(accepted_media_type)
            indent = params.get('indent', indent)
            try:
                indent = max(min(int(indent), 8), 0)
                sort_keys = True
            except (ValueError, TypeError):
                indent = None
        self.headers = self.default_response_headers  # deprecate?
          request = self.initialize_request(request, *args, **kwargs)
          self.request = request
          self.args = args
          self.kwargs = kwargs
        self.headers = self.default_response_headers  # deprecate?
  
          try:
              self.initial(request, *args, **kwargs)
  
              # Get the appropriate handler method
keep keep keep keep replace keep keep keep keep keep
 Make sure JSON output in Browseable API is nicely indented 
rest_framework/views.py