How to capture and modify Google Protocol Buffers in a Django view?
问题 Here is a link to the proto file. Please can someone help me understand how to make this work: from django.views.decorators.csrf import csrf_exempt from bitchikun import payments_pb2 @csrf_exempt def protoresponse(request): xpo = payments_pb2.Payment.ParseFromString(request) t = type(xpo) xpa = request.PaymentACK xpa.payment = xpo.SerializeToString() xpa.memo = u'success' return HttpResponse(xpa.SerializeToString(), content_type="application/octet-stream") All input appreciated :) 回答1: OK so