From the documentation Basic grid example adding represent to the table breaks the Grid.
See example below:
db.define_table(
'person',
Field('superhero'),
Field('name'),
Field('job', represent=lambda r: r if r
else 'NA')
error:
File "…\py4web\utils\grid.py",
line 490, in compute
value = col.represent(value, row)
^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: <lambda>() takes 1 positional argument but 2 were given
Regards,
Wouter
Field('job', represent=lambda value, _: value or 'NA')