Example #1
0
def gen_xml_coordinator(request):
  response = {'status': -1}

  coordinator_dict = json.loads(request.POST.get('coordinator', '{}'))

  coordinator = Coordinator(data=coordinator_dict)

  response['status'] = 0
  response['xml'] = coordinator.to_xml()

  return JsonResponse(response)
Example #2
0
def gen_xml_coordinator(request):
    response = {'status': -1}

    coordinator_dict = json.loads(request.POST.get('coordinator', '{}'))

    coordinator = Coordinator(data=coordinator_dict)

    response['status'] = 0
    response['xml'] = coordinator.to_xml()

    return JsonResponse(response)
Example #3
0
def gen_xml_coordinator(request):
  response = {'status': -1}

  coordinator_dict = json.loads(request.POST.get('coordinator', '{}'))

  coordinator = Coordinator(data=coordinator_dict)

  response['status'] = 0
  response['xml'] = coordinator.to_xml()
    
  return HttpResponse(json.dumps(response), mimetype="application/json")