Jonathan LaCour wrote:
>
> Okay, this is now done in revision 90! Fast Track should be a "good
> citizen" now when it comes to widget usage, and there is no more than
> one instance of each widget in the entire application :) However, I
> had to do this instead of what I mentioned above:
>
> <span py:for="risk in risks">
> ${risk_widget.display(risk=risk)}
> </span>
>
> ... the update_data thing didn't seem to work for me, as it doesn't
> return the instance, so I would have to do some hackery to get it to
> work in a loop. I actually like the variant I went with better
> anyway. Is this acceptable use?
>
> I had forgotten a template in the previous revision as well, so if
> you are using Fast Track, you might want to update your tree.
>
Hi Jonathan:,
Yes, that's the way you should do it, after the first reply I sended
another one (you probably missed it) where I said this:
--------------------
@Jonathan:
I overlooked one thing, you should use this:
<span py:for="risk in risks">
${risk_widget.display(risk=risk)}
</span>
update_data is called by display.
--------------------
So you're doing the right thing, FastTrack now uses widgets in the
right way! ;-)
One last thing you may want to do is moving much of the logic you have
in your widgets templates to update_data (as we're doing inside TG with
our widgets), today I should be able to take a checkout of FastTrack
and I *may* (if I found the time) provide you an example patch for one
(or more who knows) of your widgets. ;-)
Keep up the great work!
Ciao
Michele
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---