>
>
>>
>>     Field('password', 'password', length=512, 
>> compute=automatic_password,readable
>> =False, label='Password'),
>>
>> The functions create_new_agent and automatic_password are part of my 
>> libraries. They are returning the expected types (strings in both cases)
>>
>
> If you search the book for 'computed field' you will see that you need to 
> use lambda in this case.
>
> Try 
>  
> Field('password', 'password', length=512, compute=lambda r: 
> automatic_password(), readable=False, label='Password')
>

If automatic_password takes a single required argument (i.e., the Row 
object), then compute doesn't have to be a lambda -- you can use 
automatic_password directly. It just depends on the signature of 
automatic_password.

Anthony 

-- 



Reply via email to