Wednesday, May 3, 2017

Re: Link to download

On 2017-05-02 19:11, Antonis Christofides wrote:
> response = HttpResponse(csvfile.read(), content_type='text/csv')

Beware that, if your content can get huge (some of our reports can
run to hundreds of megabytes), you might want to investigate
something like the "sendfile" alternatives or spew it out as generator
instead of doing .read() to suck the whole thing into memory.

-tkc



--
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 django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/20170503133519.05365d67%40bigbox.christie.dr.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment