#21179: How-to output CSV from Django should suggest using 
`StreamingHttpResponse`
--------------------------------------+------------------------------------
     Reporter:  charettes             |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Documentation         |                  Version:  master
     Severity:  Normal                |               Resolution:
     Keywords:  afraid-to-commit      |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  1
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  1                     |                    UI/UX:  0
--------------------------------------+------------------------------------

Comment (by aaugustin):

 The code example looks like C, not like Python... I don't want to see
 `buffer_.seek(0)` in our docs.

 Streaming responses don't change much when you pull all the data in RAM,
 and if the data comes from a queryset, Django currently does that even if
 you use `.iterator()`. It seems much more interesting to me to optimize
 the database side than the HTTP response side.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/21179#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.2d1a9f52a34e7f3ba272769c0078b2a5%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to