@csrf_exempt
def crash(request):

    if request.method != 'POST':
        return HttpResponse('Invalid GET')

    node = vu._validate_node(request)
    if not node:
        return HttpResponse("Invalid node")

    #
    # checks out; with this we generate a new crash object,
    # tie it to the node ID, and write the crash data to
    # its respective file
    #

    try:
        data = json.loads(request.body)
        node.faults += + 1
        crash = Crash.objects.create(
            fault_index=data['crash_idx'],
            node_index=node,
            crash_time=utility.timestamp(),
            exception_type=vu.parse_key("EXCEPTION_TYPE", data['crash']),
            classification=vu.parse_key("CLASSIFICATION", data['crash'])
        )

        crash.save()
        node.save()
        vu._write_crash(data, node)
    except Exception, e:
        utility.msg("Failed to log crash: %s" % e, ERROR)
        return HttpResponse("Failed")

    utility.msg("Node %d posted crash" % node.id)
    return HttpResponse("Node updated")
Register crash data with the server
dataset/ETHPy150Open hatRiot/PeachOrchard/server/server/views.py/crash