As you long as there is no scenario where you would end up serving the app at http://example.org/app/ it's fine, i guess. But from my experience it's hard to be sure such a scenario will not pop up.
On Thu, Feb 16, 2012 at 7:34 PM, León Domingo <[email protected]> wrote: > Yes, to be precise it's not a relative URL but I have no problem using > /foo/bar/ > If i'm developing /foo/bar would take me to http://localhost:8081/foo/bar > In some production environment would take me to > http://somedaim.com/foo/bar. > > That's why I'm asking the use of tg.url() > > León Domingo > > Ender - Factoría de Software > [email protected] <[email protected]> > Avda. Cerro del Águila, 7. S23 - 2ª Planta > 28703 S.S. de los Reyes (MADRID) > Tlf. 902 01 44 01 > > <http://www.ender.es/> > <http://www.facebook.com/home.php?#%21/pages/San-Sebastian-de-los-Reyes-Spain/Ender-Factoria-de-Software/142213119143359?ref=ts> > * <http://www.ender.es>* > > > On 16 February 2012 17:39, Robert Forkel <[email protected]> wrote: > >> That's not really a relative url. So it won't work when your app is >> mounted at a path prefix. >> >> Am 16.02.2012 17:34 schrieb "León Domingo" <[email protected]>: >> >>> Hi people, >>> Why should I use tg.url(....) instead of a simply relative-URL? >>> >>> Lately, i'm not using it because to me it looks cleaner this: >>> >>> $.ajax({ >>> url: "/foo/bar/", >>> ... >>> }); >>> >>> than this >>> >>> $.ajax({ >>> url: "{{tg.url('/foo/bar/')}}", >>> ... >>> }); >>> >>> and the result is the same... >>> >>> Thanks >>> >>> -- >>> 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. >>> >>> -- >> 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. >> > > -- > 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. > -- 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.

