On Aug 21, 2006, at 8:51 PM, Lee McFadden wrote:
> > On 8/21/06, Jorge Godoy <[EMAIL PROTECTED]> wrote: >> >> You can change their templates today to anything written in other >> "presentation" system... No, unfortuantely this isn't possible yet. > I'd like to see how this works because everything that I've tried > causes 500 errors. It's mainly due to the following code which will > prevent anything other than a kid template working with a widget. > > http://trac.turbogears.org/turbogears/browser/trunk/turbogears/ > widgets/base.py#L226 > >> You should be able to use them. People usually use "widget.render >> ()" in other >> templating systems. > > widget.render() also uses the .display() function above. If I want to > use a widget with a template in Markup it just won't work because it's > template is being parsed by Kid. > >> I believe that it would be the responsability of the template >> system to >> provide alternate templates to widgets... We can't put that in >> the core. > > *I* believe that it's the responsibility of TurboGears to allow people > to choose which template language to use with their widgets ;) Yes, you're right. I'm +1 on allowing any template engine supported by Buffet for widgets. I guess it wouldn't be too hard to implement either. Maybe it's as easy as changing http://trac.turbogears.org/turbogears/browser/trunk/turbogears/ widgets/base.py#L226 to pick up the template engine's name from the widget's instance attribute (defaulting to 'kid') or from the template's path (like cheetah:templates.myform) if the template is in a separate file. I might have some time tomorrow to give it a try if you don't do it first... ;) Alberto --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
