Web2py display "None", and I want to display nothing

Solution 1:

You can set the "represent" attribute of the field, either at table definition time:

db.define_table('mytable',
    Field('myfield', represent=lambda v, r: '' if v is None else v))

or later:

db.mytable.myfield.represent = lambda v, r: '' if v is None else v