Re: [web2py] downloading a synthetic csv

2012-10-26 Thread José Luis Redrejo
2012/10/26 Jonathan Lundell jlund...@pobox.com I want to build a dataset (list of lists) in response to a user request and cause a csv of that dataset to be downloaded. I have a working but ugly implementation that uses @service.csv. If I access the URL

Re: [web2py] downloading a synthetic csv

2012-10-26 Thread Jonathan Lundell
On 26 Oct 2012, at 6:40 AM, Jonathan Lundell jlund...@pobox.com wrote: On 26 Oct 2012, at 2:46 AM, Niphlod niph...@gmail.com wrote: do you serve a StringIO instance ? for 2. you may try response.stream(yourcsvinstance, filename='foo.csv', attachment=True) I don't; I'm just returning a list

[web2py] downloading a synthetic csv

2012-10-25 Thread Jonathan Lundell
I want to build a dataset (list of lists) in response to a user request and cause a csv of that dataset to be downloaded. I have a working but ugly implementation that uses @service.csv. If I access the URL http://domain.com/app/default/call/csv/foo ...it works OK and downloads a file named