Hi! Christoph wrote: > normally in views.py I have a function that takes a request and > returns a render_to_response or the like. I, however, would like it to > take a request and have Django reply with multiple responses. Is there > a way to do this, or is this not possible with HTTP anyway?
HTTP works with request->response model. You can't have many responses to a single request. > What I am trying to achieve: Have a a view that gets called and in it > I have a JS/AJAX script that asks for some data. However, calculating > the data takes a while and it comes one after the other. So I thought > that I could send the data as soon as it becomes available. How much time does it take? If it is really long, you will have to do some magic spawning a python subprocess to create the data and check fromyour django app if it is ready. May be there is an easier way to achieve your real goal? What is your original task? Why data prepration takes so long? May be you can optimize it with indexes? -- Dmitry Dulepov Twitter: http://twitter.com/dmitryd/ Web: http://dmitry-dulepov.com/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.