On Thu, Jun 25, 2009 at 05:22:24AM -0700, Thomas G. Willis wrote: > ok, I've been trying to figure this out for a while, and I haven't > quite cracked this nut. > > What I'm trying to do is understand the mechanics of mounting a pylons > app as anothers controller. To get this sort of effect... > > http://myapp:5000/home/index <------site container > and > http://myapp:5000/registration/register/index <---- another pylons app > > in my registration.py controller of my container app I have... > > from paste.deploy import loadapp > RegistrationController = loadapp("config:/path/to/config.ini") > > in my routing.py of my container app I have... > > map.connect("registration/{path_info:.*}",controller="registration")
I don't think you can chain routes this way. > So, if I short circuit the make_app function of the contained app by > returning a callable which returns a simple "Hello I am contained..", > it works as expected. If, I return an app from make_app as originally > implemented, routes seems to not resolve properly to a controller in > the contained app and a 404 bubbles on up. > > Am I not 733t enough to be using this? :) Use something like Paste's urlmap instead. See the example at http://pythonpaste.org/deploy/#the-config-file Marius Gedminas -- Why when I was a kid, we had to defragment all our data structures. Had to know all the ins and outs of which data types aligned to what word size to minimize memory usage. Uphill both ways. -- Mike Barton
signature.asc
Description: Digital signature
