@loginValid
def delgood(request):
    sendData = {'code': 200, 'data': ''}
    id = request.GET.get('id')
    if id:
        cart = Cart.objects.get(id=id)
        cart.delete()
        sendData['data'] = ('删除编号%s成功' % id)
    return JsonResponse(sendData)
@loginValid
def delgood(request):
    sendData = {'code': 200, 'data': }
    id = request.GET.get('id')
    if id:
        cart = Cart.objects.get(id=id)
        cart.delete()
        sendData['data'] = ('删除编号%s成功' % id)
    return JsonResponse(sendData)