CORRECTIONl:
for field in db.mytable.fields:
*field = db.mytable[field]*
if field.type == 'double':
field.represent = lambda value: "%.2f" % value
No, but you have some options:
*1. field representation*
# apply to all fields for some table, do it before the creation of SQLTABLE
for field in db.mytable.fields:
if field.type == 'double':
field.represent = lambda value: "%.2f" % value
*2. Use Virtual Fields*
*3. Manipulate the o
This feels like a dumb question but I haven't found the answer with Google
or by searching the web2py book, so here goes:
If I have a view with {{=SQLTABLE(rows,headers=headers)}} where rows is the
result of a select, is there any way to specify a default numeric precision,
e.g. '%0.2f' to be appl
3 matches
Mail list logo