aspineux wrote:
> I like your definition of cleaner:
> <img src="../static/images/logo.png" py:attrs="src=tg.url('/static/
> images/logo.png')"/>
> vs
> <img src="../static/images/logo.png"/>
> :-)
Actually you can have it even as clean as that. You only need to put
something like the following "match template" in a separate kid file
that you inherit from via py:extends (e.g. in master.kid).
<img py:match="item.tag=='img'" src="${tg.url(item.get('src')[2:])}"/>
Then, in your actual page templates you can just write
<img src="../static/images/logo.png"/>
The match template should probably be enhanced to support other
attributes as well, but you get the idea.
-- Christoph
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---