@csrf_exempt
def delHost(request):
    hostId = request.POST['hostId']
    if ((hostId == '') or (hostId is None)):
        result = {'status': 3, 'msg': '未选中任何记录!', 'data': ''}
        return HttpResponse(json.dumps(result), content_type='application/json')
    else:
        try:
            delResult = host.objects.filter(id=hostId).delete()
            print(delResult)
            result = {'status': 1, 'msg': '删除成功!', 'data': delResult}
            return HttpResponse(json.dumps(result), content_type='application/json')
        except Exception as e:
            print(e)
            result = {'status': 2, 'msg': ('删除失败!' + str(e)), 'data': ''}
            return HttpResponse(json.dumps(result), content_type='application/json')
@csrf_exempt
def delHost(request):
    hostId = request.POST['hostId']
    if ((hostId == ) or (hostId is None)):
        result = {'status': 3, 'msg': '未选中任何记录!', 'data': }
        return HttpResponse(json.dumps(result), content_type='application/json')
    else:
        try:
            delResult = host.objects.filter(id=hostId).delete()
            print(delResult)
            result = {'status': 1, 'msg': '删除成功!', 'data': delResult}
            return HttpResponse(json.dumps(result), content_type='application/json')
        except Exception as e:
            print(e)
            result = {'status': 2, 'msg': ('删除失败!' + str(e)), 'data': }
            return HttpResponse(json.dumps(result), content_type='application/json')