[web2py] Re: defaulting a value of a column in table with other columns of table

2010-05-03 Thread Rohan
Hi Mdipierro, Could you please elaborate,I tried Field('access_key', 'string', readable=False, writable=False, default=lambda r:defaultUserInfo(r['username'], r['email'])), but keep getting TypeError: lambda() takes exactly 1 argument (0 given) error Thanks On Apr 28, 7:01 pm, mdipierro

Re: [web2py] Re: defaulting a value of a column in table with other columns of table

2010-05-03 Thread Mathieu Clabaut
Hello, Mdipierro wrote calculate=lambda... not default=lambda (But I didn't try it even if I'm interested in the trick !) -Mathieu On Mon, May 3, 2010 at 14:29, Rohan yourbuddyro...@gmail.com wrote: Hi Mdipierro, Could you please elaborate,I tried Field('access_key', 'string',

[web2py] Re: defaulting a value of a column in table with other columns of table

2010-04-28 Thread mdipierro
Much simpler. Field('access_key',calulate=lambda r: calculateValue(r['email'])) and it will be automatic On Apr 28, 2:26 am, Rohan yourbuddyro...@gmail.com wrote: Hi, I have added a new column access_key in auth_user table, I want to default it to with a value obtained by using email