[web2py] Re: New style - Lazy Field

2012-05-03 Thread Marcello
Anthony, Worked fine... Thanks very much... Marcello On Thursday, May 3, 2012 1:07:35 PM UTC-3, Anthony wrote: > > I believe the argument to Field.Virtual and Field.Lazy just needs to be a > callable object that takes a Row object as an argument, so you could write > a function and then pa

[web2py] Re: New style - Lazy Field

2012-05-03 Thread Anthony
I believe the argument to Field.Virtual and Field.Lazy just needs to be a callable object that takes a Row object as an argument, so you could write a function and then pass that function. def myfield(row): [code to generate field value from row object] return value db.mytable.myvirtual