#21179: How-to output CSV from Django should suggest using 
`StreamingHttpResponse`
--------------------------------------+------------------------------------
     Reporter:  charettes             |                    Owner:
         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
--------------------------------------+------------------------------------
Changes (by zr):

 * owner:  zr =>
 * status:  assigned => new


Comment:

 Hello, I would like to work on this ticket.

 I think that some information on how to test a view that returns a
 StreamingHttpResponse() would be useful. The Django test Client actually
 returns an iterable response, and the `.streaming_content` property is an
 instance of <itertools.imap>. You would then need to concatenate it into a
 string in order to test it, as you would do with the standard
 HttpResponse.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/21179#comment:9>
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.7ee4e19d0ce3949df8fdfe54b02c7174%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to