@renderer(format="fragment")
    def render_fragment(self, request, context, template_name):
        if template_name is None:
            if 'redirect' in context:
                return HttpResponse(
                    simplejson.dumps({
                        'redirect': request.build_absolute_uri(
                            context['redirect'])
                    }),
                    mimetype="application/json")
            raise NotImplementedError
        body = render_blocks_to_string(template_name + '.html', context,
                                       RequestContext(request))
        
        uri = tidy_query_string(request.get_full_path())
        
        try:
            title = xhtml_slimmer(body['whole_title'])
        except:
            logger.warn('Slimmer failed to slim title', exc_info=True)
            title = body['whole_title']
        
        try:
            pagebody = xhtml_slimmer(body['body'])
        except:
            logger.warn('Slimmer failed to slim body', exc_info=True)
            pagebody = body['body']
        
        return HttpResponse(
            simplejson.dumps({
                'uri': uri,
                'body': pagebody,
                'title': title,
            }),
            mimetype="application/json")
Convert a dictionary holding CC analysis result into a string containing
dataset/ETHPy150Open mollyproject/mollyproject/molly/utils/views.py/BaseView.render_fragment--crossover with--dataset/ETHPy150Open rubik/radon/radon/cli/tools.py/dict_to_xml