[web2py] represent in form field

2014-05-09 Thread 黄祥
hi, is it possible to make represent work in form field? e.g. db.product.price.represent = lambda price, field: format(price, ",d").replace(",", ".") this work only in view, not in the form field, my expectation is when user input the price in input field they will have . for thousand separated

[web2py] represent in form

2012-04-03 Thread Annet
In db.py I have a table Address which references a table Organization to display the organization name rather then the nodeID I set a validator: db.Address.nodeID.represent=lambda nodeID, row: db(db.Organization.nodeID==nodeID).select().first().name In 'database db select' Address.nodeID is rep