On 1/7/06, Ksenia Marasanova <[EMAIL PROTECTED]> wrote: > > class MyWidget(Widget): > > def __init__(self, *args, **kwargs): > > # just use textarea template for testing > > kwargs['template'] = """ > > <div xmlns:py="http://purl.org/kid/ns#" py:strip="True"> > > <textarea name="${widget.name}" id="${widget.name}" > > class="textarea_field" > > py:attrs="widget.attrs">${widget_value}</textarea> > > <span class="field_error" > > py:if="widget_error">${str(widget_error)}</span> > > </div>""" > > super(MyWidget, self).__init__(*args, **kwargs) > > Okay, I see it finally. I was using widgets devcast as a manual, but > it looks like since changeset 437 template cannot be assigned to a > widget instance, it can only be declared as a class variable (and > processed in __classinit__). > Never mind.
I think that logic has always been in __classinit__ (for better or worse) and that you can override the template *by name* if you want... SomeWidget(template="foo.bar.baz") Kevin

