Kevin Dangoor wrote:
>
> I'm not sure if you were in on the other thread, but I'll repeat it
> here just in case: render returns HTML just for random other purposes.
> When using a widget in a Kid template for real, you should use
> .insert.
>

Kevin, regarding this what do you think about my proposal of hiding the
widget insert mechanism behind a custom tag?

<widget name="datepicker" [attributes for others options] />

IMHO this will make widgets easier to use (since you are sure to do the
right thing) without exposing implementation details on the template
(the .insert method) and will also give a more coherent feeling.
Moreover if for some reason, one day, you will need to change the way
widgets works you will be able to do it without the fear of breaking
things.

In my local install I've (sort of) implemented it easily thanks to
kid's py:match.

See also:
http://trac.turbogears.org/turbogears/wiki/WidgetsBrainStorming

Just wondering what do you think.

Ciao
Michele

Reply via email to