On Wed, Jul 21, 2010 at 12:40:23PM -0700, Mike Orr wrote:
> On Wed, Jul 21, 2010 at 12:33 PM, Ian Wilson <[email protected]> 
> wrote:
> > Hello,
> >
> > I think you want something like this.
> >
> > from paste.fileapp import FileApp
> >
> > #.... in controller ....
> >         #...in some action, get the path to serve
> >         wsgi_app = FileApp(path)
> >         return wsgi_app(request.environ, self.start_response)
> 
> Yes, use paste.fileapp.  You can just return the wsgi_app object
> directly, and Pylons will call it for you.

Don't you also need to wrap it in pylons.controllers.util.forward?

http://pylonshq.com/docs/en/0.9.7/modules/controllers_util/#pylons.controllers.util.forward

(I haven't tried simply returning FileApp() myself, but I have memories
of someone on IRC who tried and got scant success.)

Marius Gedminas
-- 
The advertisement is the most truthful part of a newspaper.
                -- Thomas Jefferson

Attachment: signature.asc
Description: Digital signature

Reply via email to