thanks for this point, too :) .
i'd also like to report a small inconsistency with turbogears widgets:
class ExistingUserFields(WidgetsList):
password_1 = widgets.PasswordField('password1',
label=_("New Password"),
help_text=_("Your new password. (If you would like to
change it)."))
the code above would end in a form with a field of name="password_1"
id="password_1", while in classic tg widgets the name would be "password1", as
the name parameter to the field.
best wishes,
alex
[EMAIL PROTECTED] wrote:
> Hi Alex,
>
>> just curious that most documentation is in tg2.
>>
>
> The doc should apply for tg1 as well. The only change in tg2 is the
> new "recommended" style of passing the widget to the template by
> placing it on the template context, that is something like:
>
> @expose('mypackage.templates.myformtemplate')
> def entry(self, **kw):
> mywidget = MyWidget()
> pylons.c.w.mywidget = mywidget
> return dict(value=kw)
>
> In tg1 you would continue to pass the widget to the template by adding
> to the return dictionary similar to tg widgets. That is
>
> @expose('mypackage.templates.myformtemplate')
> def entry(self, **kw):
> mywidget = MyWidget()
> return dict(mywidget=mywidget, value=kw)
>
> Regards,
> Sanjiv
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" 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?hl=en
-~----------~----~----~----~------~----~------~--~---