Re: [web2py] Re: patch to make Rows.setvirtualfields work with SQLTABLE

2010-12-09 Thread Bruno Rocha
*Solution to the error*: ** elif headers=='labels': headers = {} for c in columns: (t,f) = c.split('.') try: field = sqlrows.db[t][f] headers[c] = field.label except KeyError:

Re: [web2py] Re: patch to make Rows.setvirtualfields work with SQLTABLE

2010-12-09 Thread Ivan Matveev
> This is my working > code: http://snipt.net/rochacbruno/virtual-fields-in-sqltabe > Note the headers=None > So need to patch the header definition to use the virtualfieldname, or > better, How to define a label for a virtual field? I think you can try to add label property to your MyVirtualFiel

Re: [web2py] Re: patch to make Rows.setvirtualfields work with SQLTABLE

2010-12-09 Thread Bruno Rocha
This is my working code: http://snipt.net/rochacbruno/virtual-fields-in-sqltabe Note the headers=None So need to patch the header definition to use the virtualfieldname, or better, *How to define a label for a virtual field?* * * for work with SQLTABLE (or plugin_datatable) we need to add the col

[web2py] Re: patch to make Rows.setvirtualfields work with SQLTABLE

2010-12-09 Thread Bruno Rocha
I think this patch needs to be reviewed, as sqlhtml.py changed a lot.