On 16/08/16 09:10, Bobby Mozumder wrote:

I also use generators for my views, and I use Django’s streaming views
with my generators to stream responses, so that the web browser receives
early responses and start rendering immediately before the view is
completely processed.  The web browser receives the first HTML fragment
before I even hit the database.

The hazard here is if anything raises an exception you've already sent headers to say it didn't... typically this results in pages terminating part way through.

Other than this, it is certainly a great way to overlap some transport latency with work. I've done the same with a generator-based JSON serialiser.


You received this message because you are subscribed to the Google Groups "Django 
developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to