Genshi does not yet have <?python ?> directives, which would allow you to instantiate a widget in the template, but in the future it will. I believe this feature is intended to arrive in version 0.4...
So, Genshi will become a templating system with a real programming language (python) inside. --Mark Ramm On 1/11/07, Joseph Tate <[EMAIL PROTECTED]> wrote: > > So, hanging out on #turbogears someone asked how you instantiate a > widget in a Genshi template. The resulting answer was "You instantiate > it elsewhere and pass it in". Is this really the case? Because that > would mean that MVC, even in it's infant form in TurboGears will be > dead in 2.0. The controller would be intimately tied to the view, and > the view can't be switched out. Yes we can do stuff with decorators to > pass in the extra formatting pieces into Genshi, but why not use a > templating system with a real programming language on the view side > like we have in Cheetah and Kid. > > Am I missing something? > > This is what I want to avoid, in any form. > > #pseudocode > @turbogears.expose(...) > def foo: > dataset=getDataset() > widget = DataGridWidget() > return dict(datasest=dataset, widget=widget) > > @turbogears.expose(...) > def foo_xmlrpc_or_jsonrpc: > dataset=getDataset() > return dict(datasest=dataset) > > > > > -- Mark Ramm-Christensen email: mark at compoundthinking dot com blog: www.compoundthinking.com/blog --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
