Wednesday, February 27, 2013

StreamingHttpResponse into a Template

Django 1.5 is just came out and it ships the StreamingHttpResponse. 

What i want to do is to print the output of a stream response into a template, having for example a bar that grows based on the streamed data (something similar to a loading bar).

so far i've found a solution that basically is to write the pieces of the final html page into the generator function, so each yield does a render_to_text of a piece of the final html page (i splitted it manually) putting each time the data just processed. 

The problem of this solution is that i can't have the loading bar. What I'm able to have are incremental data, so i can print out the list of processed data, but it's different to what i want to do.

Is there a way to do what i would like to do? 


You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment