My expectation was that it was possible to 'stream' a response back to
a browser from a view, where that response is 'trickled' onto the
browser page. I had done this a while back in cherrypy and it worked
as expected.
a super simple view demonstrates the issue. Instead of a series of
numbers marching onto the page, there is a delay and then the whole
response is written to the page. I had disabled commonmiddleware to
avoid any chance that I was hitting #7581
Is this some limitation of runserver?
from django.http import HttpResponse
import time
def streamer():
for x in range(50):
yield str(x)
time.sleep(.2)
def writeback (request):
return HttpResponse(streamer(), mimetype="text/plain")
insight welcome
-Preston
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.