[web2py] How to insert icons into a column of a table created using SQLTABLE()

2011-08-16 Thread Valter Foresto
I'm using SQLTABLE() into a controller to generate a table for the next view. A column of the table report only few states (text) that can might be better represented using small, 16x16 or 32x32, images. It is possible to insert icons, instead of text, into a table column and then pass the res

Re: [web2py] How to insert icons into a column of a table created using SQLTABLE()

2011-08-16 Thread Richard Vézina
The same way I do deletion with this function you can add stuff or replace stuff base on a if case on your differents text states... Not the best approach I think, but you can... def __del_sqltable_column(sqltable, column_name): """ For deleting a given column in an instance of web2py SQLT

Re: [web2py] How to insert icons into a column of a table created using SQLTABLE()

2011-08-16 Thread Bruno Rocha
use virtualfields for that. class Virtual(object) def my16pximage(self): return IMG(_src=URl(...)) db.table.virtualfields.append(Virtual()) table = SQLTABLE(db.table) On Tue, Aug 16, 2011 at 1:23 PM, Valter Foresto wrote: > I'm using SQLTABLE() into a controller to gene