On Sun, Jun 13, 2010 at 11:30 AM, Krishnakant Mane <[email protected]> wrote: > hello all, > a few days back i had asked a doubt on this mailing list about rendering a > pdf file to the browser from a pylons control action. > The solution came in form of paste.fileapp() function which is to be > included before the return statement in a controler action. > I know it takes care of the return mime type etc. > While it was clear that pdf would work well, I am still unsure if it will do > the same for ODS files. > I don't want to render xls files because it is a proprietory format and can > be outdated any time. > So I wish to only make use of the odf format and will like to know How I can > return an ods spreadsheet using fileapp or any thing else. > I can make sure that my client has open office installed so that is no > problem. > the only issue is to render the file to the browser and set the correct > headers like content type.
If you pass a 'content_type' keyword arg to the constructor, it will override the guessed type. Same for 'content_encoding'. See FileApp.__init__ . -- Mike Orr <[email protected]> -- 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.
