from django.views.decorators.http import condition

@condition(etag_func=None)
def stream_response(request):
    resp = HttpResponse(stream_response_generator(), mimetype='text/html')
return resp

def stream_response_generator():
    yield '<html><body>\n'
for x in range(1, 11):
    yield '<div>%s</div>\n' % x
yield ' ' * 1024
time.sleep(1)
yield '</body></html>\n'
Как передать HttpResponse с помощью Django