Christopher Arndt wrote:
> Italo Maia schrieb:
>   
>>> Is there a method to retrieve url paths to controllers or i'll have to
>>> hardcode them in my jinja templates?
>>>
>>> In Django, i have the method reverse and the tag {% url %} for
>>> retrieving those.
>>>       
>
> Daniel Fetchinson schrieb:
>   
>> With tg1 you can use the tg.url( ) function in your templates.
>>     
>
> How would that help? This function is only there to contruct URLs which
> are independent of where the *whole* application is mounted. In TG 1.x,
> the controllers do not "know", at which URL they are mounted. I believe
> the same is true for TG 2.x.
>
> But you could pass the URL path where a controller is mounted to its
> constructor and use to construct URLs. You can then pass a function to
> construct URLs for your controller methods to the template.
>   
How about just modifying tg.url() to include the functionality you want?

Tim Black

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