Alberto Valverde ha scritto:
> On Nov 23, 2006, at 1:00 PM, José de Paula Eufrásio Júnior wrote:
>
>   
>> On 11/22/06, Steve Bergman <[EMAIL PROTECTED]> wrote:
>>     
>>> The template renders as just the text:
>>>
>>> <Element u'table' at 0xb72b7b18>
>>>
>>> This works with Kid.  Is this supposed to work with Genshi in  this
>>> test release?
>>>       
>> Yesterday I changed all my kid templates to genshi, then I noticed
>> that my widgets stoped showing. :P
>> I reverted all the SVN back because I tought that widgets are
>> incompatible with genshi, but some searching in google bring something
>> about a 'template_engine' parameter on widgets.
>> I haven't tested it yet, but if it works let me know :P
>> I lost like half an hour migrating all templates just to discover that
>> it was not working :P (probably by my stupidity)
>>     
>
> 1.0 widgets can only use Kid as a template language. To insert them  
> on a Genshi template you should wrap it with genshi's ET function:
>
> ${ET(widget.display())}
>
> You'll need to make the ET function available to every template  
> through a variable_provider. You could also monkey-patch  
> Widget.display to have this automatically done.
>
> The template_engine parameter is only available on trunk and will  
> likely be discontinued in favor of ToscaWidgets (http:// 
> toscawidgets.org) which supports any template language available  
> which has a python.templating entry_point defined. I'd highly  
> recommmend it if you really want to use Genshi with your widgets  
> (maybe because I'm the author? ;) )
>
> HTH,
> Alberto
>
>   
Hi Alberto,

I would like try toscawidgets... I see there is somewhere a sample, but 
I can't find it.

There's a TurboGears 1.0b2 sample app in examples/tgsample which you can 
run by cd'ing in that directory and running: ./start-tgsample.py. The 
app runs on port 8080 of the local host.

jo




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