Jorge Vargas wrote:
>>
>> when I try to change value options as:
>> addForm.fields[0].fields[0].options = my_list
>>
>> I have this error:
>> *exceptions.ValueError: ('It is not threadsafe to modify widgets in a
>> request')
>>
>> is there a way to do that?
>>
> why can't you set everything before, this restriction is explicit so
> you don't shot yourself in the foot.
> 
> could you give more details?

Actually this is a good question that I have a problem with myself all 
of a sudden.

What if the options for select fields is dynamically obtained for each 
invocation of the form?

My other question that has just bitten me on this is the format 
parameter for a DatePicker widget. At the moment I specify it in the 
form which, as normal, gets constructed at load time. However, I need to 
set the date format dynamically according to the language of the current 
request.

Can these things be done dynamically for widgets in forms? Can it be 
done in the controller or template? Seems pretty fundamental. Most 
likely I have missed something obvious as usual....

Thanks,
Gary.


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