Re: [web2py] Re: How to render a csv file without using template

2016-07-21 Thread Ben Lawrence
Thanks MCM this method still works nearly 3 years later! A question though: when the csv file is downloaded it has the name 'unknown' with no .csv. Do you know how I can change that filename to something like 'data.csv' ? thanks in advance, Ben On Friday, November 1, 2013 at 3:36:00 PM UTC-7, mcm

Re: [web2py] Re: How to render a csv file without using template

2013-11-01 Thread Michele Comitini
To avoid redirect and use ajax see this thread: https://groups.google.com/d/msg/web2py/HQU5kD0tGag/LGtjlikzWdsJ mind that there is a penalty due to base64 encoding, that implies that the benefit depends on how large the data to be trasmitted is. 2013/11/1 Niphlod > yep. > check response.strea

[web2py] Re: How to render a csv file without using template

2013-11-01 Thread Niphlod
yep. check response.stream http://web2py.com/books/default/chapter/29/04/the-core?search=response.stream On Friday, November 1, 2013 8:24:11 PM UTC+1, San L wrote: > > We would like to allow use user to download a csv file when clicking a > button on a page (not redirect or pop up a new window)