django stream a dictionary multiple times w/o breaking JSON

前端 未结 1 1060
北恋
北恋 2021-01-16 20:23

I want to stream a response using Django. In order to do so, I have a view like this:

def flights(request, query): req_obj = Flights.RequestObject(query)

相关标签:
1条回答
  • 2021-01-16 21:09

    Have you tried something like

    req_obj.update(req_obj.make_response())
    

    which will update your initial dict with the values newly yielded from your method?

    0 讨论(0)
提交回复
热议问题