Yes but I am not sure from your question if you want the visitor to
save the file on the client machine or on the server machine. I assume
the former:

def save_file():
     filename='bla.html'
     response.headers['Content-Disposition']='attachment;
filename="%s"' % filename
     return dict(var='whatever')

On Apr 2, 2:07 am, JC11 <john.c...@gmail.com> wrote:
> Hello,
> I would like to use the excellent template facilities in web2py views
> {{....}} but save the results to a file rather than present them as a
> web page.  How would this be possible ?
>
> This is just for one of several views in my application and should
> happen always for the one view without the user needing to do
> anything.  This can manually be achieved by the user seeing the page,
>
> > view source, > save as .....
>
> Thanks,
> JC
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to