def process_event(request, eventID, eventData):
return HttpResponse("process event!")
@csrf_exempt
@slip_protect
def catch_event(request,eventID):
if request.POST:
process_event(request,eventID, request.POST['eventData'])
return HttpResponse("safe return!")
That code returns “Safe Return!” on client side, and not “process event!”. Is that by design and expected behavior? I want to delegate to a function from a view, function should return a response object.
Thanks.
i guess you want
return process_event(), so that your view returns whatever it gets backas it currently reads, your view executes
process_eventbut throws away the returnedHttpResponse