Thanks,
I've added a ticket to trac:
http://trac.turbogears.org/ticket/2033

Would that require only middleware.py to change by added the value of
script name SCRIPT_NAME in front of any image or css folders ?

Lucas


On Fri, Nov 14, 2008 at 3:14 AM, Graham Dumpleton
<[EMAIL PROTECTED]> wrote:
>
>
>
> On Nov 14, 2:50 pm, "Lukasz Szybalski" <[EMAIL PROTECTED]> wrote:
>> > To distinguish between different apps, either use vhosts (certainly the
>> > best solution) or tg.url for rendering every url & set "server.webpath"
>> > to create a common prefix for all urls in each application.
>>
>> Do you know how can I set server.webpath in wsgi scipt?
>
> You should not need to set server.webpath. A well behaved WSGI
> application would automatically derive the application mount point
> from the value of SCRIPT_NAME passed by the underly WSGI adapter to
> the WSGI application. If TG2 doesn't do this, then it is broken.
>
> Thus, you should just need to say:
>
>  WSGIScriptAlias /subapp /some/path/subapp.wsgi
>
>  Alias /subapp/images /some/otherpath/subapp/static/images
>  Alias /subapp/css /some/otherpath/subapp/static/css
>
>  WSGIScriptAlias / /some/path/rootapp.wsgi
>
>  Alias /images /some/otherpath/rootapp/static/images
>  Alias /css /some/otherpath/rootapp/static/css
>
> and it should work. If not, then as I said, TG2 is arguably doing the
> wrong thing, or way that URLs within pages for images and css are
> being constructed wrongly.
>
> See old discussion.
>
>  http://groups.google.com/group/turbogears/browse_frm/thread/b8978e071762428d
>
> I believe that maintenance happening on older TG1 derived versions may
> have added a patch for this to subversion. Whether it has been
> released in a TG1 version I am not sure.
>
> Graham
> >
>



-- 
Turbogears2 Manual
http://lucasmanual.com/mywiki/TurboGears2
Bazaar and Launchpad
http://lucasmanual.com/mywiki/bzr

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

Reply via email to