Looking through the code (and reading the documentation), it turns out
that this is intentional. I've solved the problem by stripping off
the last component of the path in the SCRIPT_NAME environment variable
which gets me up to the root controller, but doesn't mess anything up
if the app is dispatched by another containing WSGI app.
Here's the code I'm using which works fine, but looks a bit ugly. Any
improvements for style and readability are welcomed.
# fixup the SCRIPT_NAME path to go up one level
tempScriptName = environ['SCRIPT_NAME']
baseUrl = urllib.basejoin(environ['SCRIPT_NAME'] + '/', '../')
baseUrl = baseUrl.replace('/../', '')
environ['SCRIPT_NAME'] = baseUrl
# render the new page
lstContent = [render("genshi", "TemplateName"), ]
# restore SCRIPT_NAME
environ['SCRIPT_NAME'] = tempScriptName
-Eric
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---