Christoph Zwerschke schrieb:
> Ben Sizer schrieb:
>> Is update_params only called once, then? This would allow me to modify
>> my data based on the flags I passed in, which is one way of doing it.
> 
> It's called once after display(), so you have the change to add 
> parameters even at the last minute in the display() call.
> 
> Note that any callable parameters that you pass this way are 
> automatically called (without any additional arguments) - I think that 
> was one of your questions.
> 
>> But is there some way I can call back out to a Widget's methods from
>> the Kid template? Or is my interface with the template limited to
>> whatever is in 'params'?
> 
> You can call any methods that you have listed under "params".

Or that you have put into the parameters in update_params. You can do


def update_params(self, d):
     super(...).update_params(d)
     d['some_method'] = self.some_method


and then in the template just access some_method:

<div py:for="item in some_method()"> ...


Diez


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

Reply via email to