[web2py] Re: Representing foreign field with image (format/represent)

2012-02-12 Thread Anthony
Like "represent", "format" should be either a string or a callable, so you should also be able to do: format=lambda row: IMG(_src=URL('static', 'images/red.jpg')) Anthony On Sunday, February 12, 2012 1:02:55 PM UTC-5, Alan Etkin wrote: > > I belive that format is intended for string output: >

Re: [web2py] Re: Representing foreign field with image (format/represent)

2012-02-12 Thread Keith Edmunds
Thanks Alan, that has enabled me to do what I want. -- "You can have everything in life you want if you help enough other people get what they want" - Zig Ziglar. Who did you help today?

[web2py] Re: Representing foreign field with image (format/represent)

2012-02-12 Thread Alan Etkin
I belive that format is intended for string output: "... deļ¬nes a format string for the table. It determines how a record should be represented as a string. ..." For presenting other objects you could use the Field attribute represent "... table.id.represent = lambda id, row: \ A('edit:',id,_hre