Hi Ksenia

The problem here is that the recursive middleware can only forward to 
paths below it. In this case, the recursive middleware is setup in the 
error document middleware in the myproject app so when you try to 
include /someapp the recursive middleware thinks you mean /someapp below 
myproject, not /someapp below the root URL.

To fix this you would need to setup recursive middleware above the 
composite app you've setup by adding a recursive filter. I don't know if 
it is possible to put a filter before the composite:main section in the 
config file itself but depending on how you are serving the file you can 
do something like this:

from paste.recursive import RecursiveMiddleware
from paste.deploy import loadapp

app = loadapp('config:/path/to/config.ini')
app = RecursiveMiddleware(app)

if __name__ == '__main__':
     from paste.httpserver import serve
     serve(app, port=8000, host="0.0.0.0"

I haven't tested this so let me know if there are any problems.

If you give me some more detail about what the inter-application 
templating system is for I might be able to give you some alternative 
suggestions? The simplest solution would probably be to just create a 
python module which handles the templating calls and can be imported by 
both applications.

Hope that helps,

James

Ksenia Marasanova wrote:
> /someapp/test is a valid path, but it's a different WSGI application,  
> mounted in the configuration file:
> 
> [composite:main]
> use = egg:Paste#urlmap
> / = myproject
> /someapp = someapp
> 
> [app:myproject]
> use = egg:myproject
> cache_dir = %(here)s/cache/myproject
> session_key = myproject
> session_secret = somesecret
> 
> [app:someapp]
> use = egg:someapp
> cache_dir = %(here)s/cache/groovy
> session_key = someapp
> session_secret = somesecret
> 
> After upgrading to Pylons==dev the error gives more information:
> exceptions.NotImplementedError: Action someapp is not implemented
> 
> Is it by design? I am looking for a way to implement some kind of  
> simple inter-application templating system, and recursive.include  
> seemed to be the easiest way to do that. But if there is better  
> alternative, I'd be glad to hear that :)
> 
> Thanks,
> Ksenia.
> 
> 
> > 


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to