what is the syntax of compute, if i use reference in the table definition
db.define_table('item',
        Field 
<http://www.web2py.com/book/default/docstring/Field>('unit_price','double'),
        Field 
<http://www.web2py.com/book/default/docstring/Field>('quantity',db.quantity),
        Field 
<http://www.web2py.com/book/default/docstring/Field>('total_price',
            compute=lambda r: r['unit_price']*r['?????']))

entering'quantity' it uses id of that field

andrej

Reply via email to