Re: [web2py] Re: Manipulate Rows Object and/or SQLTABLE

2010-11-15 Thread Ivan Matveev
The patch is in the text of this message: patch to make Rows.setvirtualfields work with SQLTABLE http://groups.google.com/group/web2py/browse_thread/thread/826a37f56c26d689/210036457d278cdc?lnk=gstq=patch+to+make+Rows.setvirtualfields+work+with+SQLTABLE#210036457d278cdc or e-mailing patched

[web2py] Re: Manipulate Rows Object and/or SQLTABLE

2010-11-15 Thread Martin.Mulone
If it's for small things you can use: http://groups.google.com/group/web2py/browse_thread/thread/1a1d52d29611564d/3ef8ca27ecfcea58?lnk=gstq=table+div#3ef8ca27ecfcea58 On Nov 9, 2:36 pm, villas villa...@gmail.com wrote: I want to customize the result of SQLTABLE so that it can make me a nice

[web2py] Re: Manipulate Rows Object and/or SQLTABLE

2010-11-15 Thread villas
@Martin - I like that! I think the ability to add rows and columns in an obvious way is something that has been missing. SQLTABLE needs this feature for quick 'views'. However, for DB rows, I think Mr Freeze's Webgrid might be the right vehicle for further development mainly because we really

Re: [web2py] Re: Manipulate Rows Object and/or SQLTABLE

2010-11-15 Thread Ivan Matveev
Sorry for posting what I'v already posted, but it looks like my post on the patch to make SQLTABLE work with Rows object with added virtual fields was lost. I think the easiest solution to add a column to select result and view the result in SQLTABLE wold be something like: class ExtraFields:

[web2py] Re: Manipulate Rows Object and/or SQLTABLE

2010-11-14 Thread Ivan Matveev
I want to customize the result of SQLTABLE so that it can make me a nice table without lines and lines of code in my view file.  To achieve that,  I need for example to: 1) Add columns to hold icons and links and extra stuff. 2) Customize the rows, e.g.  links which depend on content,  

[web2py] Re: Manipulate Rows Object and/or SQLTABLE

2010-11-14 Thread Ivan Matveev
I want to customize the result of SQLTABLE so that it can make me a nice table without lines and lines of code in my view file.  To achieve that,  I need for example to: You can add any column to select result. The result can be passed to SQLTABLE. See:

[web2py] Re: Manipulate Rows Object and/or SQLTABLE

2010-11-14 Thread villas
Nice one Ivan! Will the patch be included in Web2py? I hope Massimo likes it. -D On Nov 15, 12:27 am, Ivan Matveev imatvee...@gmail.com wrote: I want to customize the result of SQLTABLE so that it can make me a nice table without lines and lines of code in my view file.  To achieve that,

Re: [web2py] Re: Manipulate Rows Object and/or SQLTABLE

2010-11-14 Thread Ivan Matveev
 Will the patch be included in Web2py?  I hope Massimo likes it. So do I. Otherwise I will have to patch after every web2py update.

[web2py] Re: Manipulate Rows Object and/or SQLTABLE

2010-11-14 Thread mdipierro
I am confused. Where is the patch? On Nov 14, 7:16 pm, Ivan Matveev imatvee...@gmail.com wrote:  Will the patch be included in Web2py?  I hope Massimo likes it. So do I. Otherwise I will have to patch after every web2py update.

[web2py] Re: Manipulate Rows Object and/or SQLTABLE

2010-11-10 Thread villas
The function looks interesting, but I didnt understand how to create the cols var. def mytable(rows, cols): return TABLE(*[TR(*[TD(row[c]) for c in cols]) for row in rows]) I would be grateful for an example how it might work. I did have this other idea to include an extra column, but I

[web2py] Re: Manipulate Rows Object and/or SQLTABLE

2010-11-10 Thread DenesL
If all you need is an extra column have a look at col3 in SQLFORM http://web2py.com/book/default/chapter/07#SQLFORM On Nov 10, 5:33 am, villas villa...@gmail.com wrote: The function looks interesting, but I didnt understand how to create the cols var. def mytable(rows, cols): return

[web2py] Re: Manipulate Rows Object and/or SQLTABLE

2010-11-09 Thread mdipierro
I see two options: 1) use db.table.field.represent = lambda value: DIV(value) and give any representation you want to the field value. 2) If this does not work make your own SQLTABLE helper: def mytable(rows, cols): return TABLE(*[TR(*[TD(row[c]) for c in cols]) for row in rows)