Thanks for your quick answer.
I figure it out just right now, here is my. It's working as
expected !!
def formatFlag(value):
if value == 1:
icon = 'msg_received'
elif value ==0:
icon = 'msg_sent'
return IMG(_src=URL('static', 'images/%s.png' % icon),
_alt='icon')
db.message.flags.represent = lambda value,row: formatFlag(value)
On Mar 22, 5:28 pm, Wikus van de Merwe <[email protected]>
wrote:
> You can use a format string to define the data representation, read
> this:http://web2py.com/books/default/chapter/29/6#Record-representation
>
> To get the icons, instead of a format string, pass a function that
> generates the required HTML code.