Hi,
I'm not sure of your question but if you want to translate something
like "/foo" to "http://www.mydomain.com/foo"; you have to make your own
function. I personally use a key in the .ini config and then a
function reads that key to join the "base url" to the relative url:

app.url = http://www.mydomain.com/
url2('/foo') => http://www.mydomain.com/foo

def url2(url):
    from tg import config
    import urllib

    base_url = config.get('app.url')
    if not base_url:
        return url

    else:
        return urllib.basejoin(base_url, url)

León

On Dec 21, 5:49 am, Michael Pedersen <[email protected]> wrote:
> Is tg.url what you're looking for? Documentation for it is 
> athttp://turbogears.org/book/appendices/modules/TurboGears2.html
>
> On Fri, Dec 16, 2011 at 9:14 AM, Joshua Partogi 
> <[email protected]>wrote:
>
>
>
>
>
>
>
>
>
> > Hello, Is it possible to call route name from inside templates so we
> > do not have to hardcode URL in our templates, i.e ${route('hello;) }
> > I tried to find the documentation for this with no luck. Your help
> > would be very much appreciated.
> > --
> > @jpartogi
>
> > --
> > 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.
>
> --
> Michael J. Pedersen
> My Online Resume:http://www.icelus.org/-- Google+http://plus.ly/pedersen
> Google Talk: [email protected] -- Twitter: pedersentg

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