The current solution (ie: use_wsgi_app) does not quite cut it. The 
problem is that to effectively mount a WSGI app inside a TG app two 
things must be done beofre delegating the request:

1) Pop a number of path elements from PATH_INFO into SCRIPT_NAME. This 
is needed so the inner app knows where it's mounted at and can generate 
urls, etc..
2) Copy the environ before doing 1. This is because if the inner app 
returns an error status code that TG's middleware is configured to trap, 
the static links in the error page TG/Pylons generates won't be built 
properly since the SCRIPT_NAME is the one that has been updated for the 
inner app.

So, I propose a solution like this one:
http://hg.python-rum.org/TgRum/file/73c6d8a87fb2/tgrum.py#l12

Sounds good? Can I move that code, with a better name (ideas please, 
else I'll leave it as RumController.. ;), to somewhere inside TG2?   
Where? Where in the docs can I mention it?

Alberto

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" 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/turbogears-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to