(request, domain, app_id, module_id, form_id)
See Application.fetch_xform
See Application.fetch_xform
See Application . fetch_xform
def download_xform(request, domain, app_id, module_id, form_id):
    """
    See Application.fetch_xform

    """
    profile = _get_build_profile_id(request)
    try:
        form = request.app.get_module(module_id).get_form(form_id)
        return HttpResponse(
            request.app.fetch_xform(form, build_profile_id=profile)
        )
    except (IndexError, ModuleNotFoundException):
        raise Http404()
    except AppManagerException:
        form_unique_id = request.app.get_module(module_id).get_form(form_id).unique_id
        response = validate_form_for_build(request, domain, app_id, form_unique_id, ajax=False)
        response.status_code = 404
        return response
def download_xform ( request , domain , app_id , module_id , form_id ) : profile = _get_build_profile_id ( request ) try : form = request . app . get_module ( module_id ) . get_form ( form_id ) return HttpResponse ( request . app . fetch_xform ( form , build_profile_id = profile ) ) except ( IndexError , ModuleNotFoundException ) : raise Http404 ( ) except AppManagerException : form_unique_id = request . app . get_module ( module_id ) . get_form ( form_id ) . unique_id response = validate_form_for_build ( request , domain , app_id , form_unique_id , ajax = False ) response . status_code = 404 return response