On 14/04/2006, at 22:56, Simon Belak wrote: > > Michele Cella wrote: >> Hi guys, >> >> I would like to hear your opinion on these things: >> >> 1) We have the nifty template_vars attribute that let's us pass >> values >> at class, construction and display time without the need to >> implement a >> single line of code. >> >> While writing some widgets I have noticed that I would like to use it >> even for some parameters that I need but that at the end will not end >> up to be used inside the template (an example is the disabled_fields >> parameter for a form), in other case the name used in the template is >> the same as the one in template_vars but the content of the >> variable is >> not exactly the same. >> >> So I'm wondering should we rename template_vars to a more generic >> name? >> parameters perhaps? the reason is that I avoid using template_vars if >> the attribute used is not directly present inside the widget template >> since the relation between template_vars and template is being >> lost in >> this case. > > +1 > Perhaps tg_args (since Python uses the term argument)?
+1 on this too, but I like "widget_args" better. Makes clearer we're talking about widgets IMO. No extra magic attribute please, widget_args (or whatever) will then mean: "any argument you can override when subclassing, initializing and display". (instead of only template arguments) Reards, Alberto --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
