On Jul 9, 4:32 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> can somebody give me a hint on how static content is served? I need to "embed"
> the TG2-app into an existing wsgi-app below a certain path - and obviously
> serving e.g. the CSS fails miserably. There was the old way of using tg.url
> and server.webpath (or such) - any such facility available?

It looks about the same as tg1, looks in controllers.py for tg.url

def url(tgpath, tgparams=None, **kw):
    """
    url() re-implementation from TG1
    """

    if not isinstance(tgpath, basestring):
        tgpath = "/".join(list(tgpath))
    if tgpath.startswith("/"):
        app_root =
pylons.request.application_url[len(pylons.request.host_url):]
        tgpath = app_root + tgpath
        tgpath = pylons.config.get("server.webpath", "") + tgpath
        result = tgpath
    else:
        result = tgpath
....

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