I literally copied your exact code (just had to hard-code the filename):

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 and I got the CSV file download, with 
the content as above.

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?
>

Reply via email to