'Returns the context used to render.'

def get_context(self, data, accepted_media_type, renderer_context):

    view = renderer_context[u'view']
    request = renderer_context[u'request']
    response = renderer_context[u'response']
    renderer = self.get_default_renderer(view)
    raw_data_post_form = self.get_raw_data_form(data, view, u'POST', request)
    raw_data_put_form = self.get_raw_data_form(data, view, u'PUT', request)
    raw_data_patch_form = self.get_raw_data_form(data, view, u'PATCH', request)
    raw_data_put_or_patch_form = (raw_data_put_form or raw_data_patch_form)
    response_headers = OrderedDict(sorted(response.items()))
    renderer_content_type = u''
    if renderer:
        renderer_content_type = (u'%s' % renderer.media_type)
        if renderer.charset:
            renderer_content_type += (u'    ;%s' % renderer.charset)
    response_headers[u'Content-Type'] = renderer_content_type
    if (getattr(view, u'paginator', None) and view.paginator.display_page_controls):
        paginator = view.paginator
    else:
        paginator = None
    csrf_cookie_name = settings.CSRF_COOKIE_NAME
    csrf_header_name = getattr(settings, u'CSRF_HEADER_NAME', u'HTTP_X_CSRFToken')
    if csrf_header_name.startswith(u'HTTP_'):
        csrf_header_name = csrf_header_name[5:]
    csrf_header_name = csrf_header_name.replace(u'_', u'-')
    context = {u'content': self.get_content(renderer, data, accepted_media_type, renderer_context), u'view': view, u'request': request, u'response': response, u'user': request.user, u'description': self.get_description(view, response.status_code), u'name': self.get_name(view), u'version': VERSION, u'paginator': paginator, u'breadcrumblist': self.get_breadcrumbs(request), u'allowed_methods': view.allowed_methods, u'available_formats': [renderer_cls.format for renderer_cls in view.renderer_classes], u'response_headers': response_headers, u'put_form': self.get_rendered_html_form(data, view, u'PUT', request), u'post_form': self.get_rendered_html_form(data, view, u'POST', request), u'delete_form': self.get_rendered_html_form(data, view, u'DELETE', request), u'options_form': self.get_rendered_html_form(data, view, u'OPTIONS', request), u'filter_form': self.get_filter_form(data, view, request), u'raw_data_put_form': raw_data_put_form, u'raw_data_post_form': raw_data_post_form, u'raw_data_patch_form': raw_data_patch_form, u'raw_data_put_or_patch_form': raw_data_put_or_patch_form, u'display_edit_forms': bool((response.status_code != 403)), u'api_settings': api_settings, u'csrf_cookie_name': csrf_cookie_name, u'csrf_header_name': csrf_header_name}
    return context
