I'll repost here...

The default templates that come with turbogears2 don't use the url_for
function and therefore they don't know about SCRIPT_NAME.
A workaround is to include the function in the default templates of
tg2.

FIX:
the default templates will need to change
In lib/helpers.py the following will need to be imported:
from routes import url_for

In master.html a css stylesheet will need to be changed to:
<link rel="stylesheet" type="text/css" media="screen" href="${h.url_for
('/css/style.css')}" />

footer.html:
 <img src="${h.url_for('/images/under_the_hood_blue.png')}"
alt="TurboGears" />


header.html
<img src="${h.url_for('/images/logo.png')}" alt="TG2!"/>

possibly login.html

Thanks for your help.
Lucas



On Nov 14, 12:16 am, "Graham Dumpleton" <[EMAIL PROTECTED]>
wrote:
> 2008/11/14 Graham Dumpleton <[EMAIL PROTECTED]>:
>
>
>
> > 2008/11/14 Lukasz Szybalski <[EMAIL PROTECTED]>:
>
> >> Hello,
>
> >> I'm trying to host the turbogear2/pylons application using this wsgi script
>
> >> WSGIScriptAlias /myapp /usr/local/turbogears/myapp/apache/myapp.wsgi
>
> >> but in tg2/pylons the image and css folders point to  localhost/images
> >> localhost/css
>
> > Do you mean it is generating URLs withhttp://localhost/imagesand
> >http://localhost/css?
>
> > Or do you mean that 'localhost' appears in the path component of the URL?
>
> > Anyway, sounds like a TG2 configuration issue rather than mod_wsgi
> > issue. Perhaps ask on TurboGears list.
>
> FWIW, discussion on TG list at:
>
>  http://groups.google.com/group/turbogears/browse_frm/thread/328c818eb...
>
> Graham
>
> > Graham
>
> >> Would you guys know how I can go around it?
>
> >> One way would be to use a virtualhost I presume; would you have a
> >> sample on how to config virtualhost that I could use with /myapp?
>
> >> Is there a case where virtualhost wouldn't work?
>
> >> Thanks,
> >> Lucas
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"modwsgi" 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/modwsgi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to