Hi Jorge, This is actually a problem, and sometimes ago there was a discussion about this:
http://tinyurl.com/cd525 I've also made a wiki page to collect feedback like your: http://trac.turbogears.org/turbogears/wiki/WidgetsBrainStorming As I noted on the wiki page the ability to give a valid kid file to designers to be customized is vital and is (and would be for widgets) a killer feature provided by TG. ATM you can override/customize the template used by your form widget by passing a new template argument to the widget constructor (template can be an inline string definition or a package containing a kid template). You can find the original template in the turbogears.widgets package, once the ToolBox is ready it will assist you for this step. Today I was thinking (but I'm not sure) that maybe we should be able to specify a different template at widget insert time (not or not only at instantiation time), an example using the new syntax I proposed on the wiki page: <widget name="contact_form" template="myapp.templates.widgets.contact_form" /> The ability to specify a template on the view side will help designers find what thing they need to customize and ensures a clean MVC separation. Problems remain for complex widgets like forms (that contain other widgets). Another solution can be a script that let's the developer (you) fetch a given template to be customize: tg-admin customize widget FormTable myformtable.kid you can then place all widgets templates on a directory so that your designer can customize them along others template: templates |_ index.kid |_ blog.kid |_ widgets |_ textfield.kid |_ textarea.kid this is like the solution I proposed on the discussion about code generation, but there are some problems regarding TG new releases and keeping thing in sync. If you (or others) have opinions please add them to the wiki page, it's important to make widgets easy to use and to customize, and Kevin is interested on any feedback. Ciao Michele Jorge Godoy wrote: > I was taking a look at how widgets work -- I'm doing a lot of forms here -- > and then one thing came to my mind: > > How can I send my template to the webdesigner do the final layout if > he can't see my widgets in his > <insert_the_html_editor_of_your_preference_here>? > > When I edit forms directly in Kid and specify validators directly at my > methods, I can send him the Kid file and get back some CSS + modified file. > > I know we "developers" find it a bit annoying to have to edit HTML like this, > but isn't this going against what has been thought for Kid? > > OTOH, using this programmatic style to get the HTML generated is interesting > ;-) > > > So... What are you doing with widgets? How are you sending those forms to > the "art" department? > > -- > Jorge Godoy <[EMAIL PROTECTED]>

