I literally just copied and pasted your code into a basic 'welcome' app,
except I hard-coded a filename ("data.csv"):
def download():
response.headers['Content-Type'] = 'text/csv'
attachment = 'attachment;filename=data.csv'
response.headers['Content-Disposition'] = attachment
content = '....,....,....'
raise HTTP(200,str(content),
**{'Content-Type':'text/csv',
'Content-Disposition':attachment + ';'})
Then I entered that URL in my browser address bar, and I got a CSV file
download, which opened right up in Excel (it included one row of data, with
"..." in each of the three first columns).
Anthony
On Wednesday, December 28, 2011 3:55:12 PM UTC-5, thstart wrote:
>
> file is composed dynamically - I get it from request - it is send like
> ?file=name and I get it from there.
>
> can you post the code you just tried?
>