def convert_to_ajax(page, context_instance):

    response = apply_rules(page)

    # The following is Deprecated for Django 1.3
    # if 'module_content' in response:
    # module_content = HttpResponse(response['module_content'], mimetype='text/html')
    #    response['module_content'] = csrf().process_response(context_instance['request'], module_content).content

    return response
Converts Django HTML response into AJAX response represented by a dict()
dataset/ETHPy150Open treeio/treeio/treeio/core/ajax/converter.py/convert_to_ajax