Hello,
I was looking the book  http://www.web2py.com/books/default/chapter/29/06
And intrested with:

New style virtual fields (experimental)


Create model.db with:

db.define_table('item',
   Field('unit_price','double'),
   Field('quantity','integer'))
db.item.total_price = Field.Virtual(lambda row: row.unit_price*row.quantity)

Open database admin and insert some numbers
but the table view gives only flash with:

'Row' object has no attribute 'unit_price'

and no data.

Please correct my mistake, 
I think I missed something.

Thanks,
Maxim

-- 



Reply via email to