Oops sorry for leaving the doc reference on the page. It has been
removed :(

Regards
Sanjiv

On Jun 26, 12:20 pm, Sanjiv <[EMAIL PROTECTED]> wrote:
> Hi Roger,
>
> The WidgetBunch is no more required and the widget may be directly
> stuck to the tmpl_context. So all pylons.c.w becomes pylons.c, i.e.
>
>   pylons.c.form = create_movie_form
>
> and the widget can be obtained in the template directly from the
> tmpl_context as
>
>   ${tmpl_context.form(value=value)}
>
> The docs seem to be not yet to be updated as this is a very recent
> change.
>
> Regards
> Sanjiv
>
> [1]http://docs.turbogears.org/2.0/RoughDocs/ToscaWidgets/Forms
>
> On Jun 26, 9:15 am, "Roger Demetrescu" <[EMAIL PROTECTED]>
> wrote:
>
> > Hi guys
>
> > I am following the tutorial from "Using ToscaWidgets to create Forms" [1],
> > and I am getting the following error:
>
> > AttributeError: 'str' object has no attribute 'form'
>
> > just after my statement:
>
> >         pylons.c.w.form = create_movie_form
>
> > If I change this line to:
>
> >         pylons.c.w = dict()
> >         pylons.c.w['form'] = create_movie_form
>
> > Everything runs ok (the template has ``${tmpl_context.w.form()}``  inside 
> > it)
>
> > So, what should be pylons.c.w ? a Bunch ? Who defines it ?
> > I see mod/pylonshf.py from ToscaWidgets making use of
> > ``getattr(pylons.c, 'w', None)``,
> > but I couldn't find any initial setup of this object ``w``.
>
> > Cheers,
>
> > Roger
>
> > [1] -http://turbogears.org/2.0/docs/main/ToscaWidgets/forms.html
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to