Pavel Skvazh wrote:
> Rather basic question.
> I've got to return a text file.
>
> response.headers['Content-Type'] = 'text/plain'
> return 'Hello, cruel world'
>
> The dialog pops out, but the filename is obviously blank and the
> browser comes up with some random one. How do i set it manually?
>
fname = "hello_world.txt"
response.headers['Content-Disposition'] = \
'attachment; filename="%s"' % fname
Alberto
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---