Baruch Even wrote:
>
> There was a link posted an hour ago to an application based on TG released
> as Open Source, When I looked at the source they do exactly what you ask
> for. But instead of adding the widget to the dict passed they instantiate
> the widget inside the template. It looks like a great way to do what you
> want.
>

Mmm, I didn't noticed they are doing this, that's not how widgets are
supposed to work.
You should be able to reuse the same widget instance across multiple
requests since widgets are stateless.

Anyway, back to the initial question, you can use variableProvider
(soon to become variable_provider in 0.9a2 if I prepare the patch
quickly) in this way I think (not tested):

from turbogears import view

view.variableProviders.append(my_widget_instance)

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
-~----------~----~----~----~------~----~------~--~---

Reply via email to