[web2py] Re: Virtual Field and sqlform.grid

2014-01-06 Thread sunny
Field.Virtual has a name attribute which has to be set: db.Post.category_list = Field.Virtual( 'category_list', lambda row: get_category_list(row.Post) ) Am Mittwoch, 20. November 2013 19:26:23 UTC+1 schrieb Eduardo Cruz: > > Whe I use a table that has some a virtual field sqlform.grid does not

[web2py] Re: Virtual Field and sqlform.grid

2014-01-06 Thread sunny
I think, you need to delete the old session files of your application. I had the same problem. Am Mittwoch, 20. November 2013 19:26:23 UTC+1 schrieb Eduardo Cruz: > > Whe I use a table that has some a virtual field sqlform.grid does not works > > 'Row' object has no attribute 'unknown' > > and th

Re: [web2py] Re: Virtual Field and sqlform.grid

2013-11-22 Thread Eduardo Cruz
'Row' object has no attribute 'unknown' Version web2py™ Version 2.7.4-stable+timestamp.2013.10.14.15.16.29 Traceback Traceback (most recent call last): File "/home/eduardo/PycharmProjects/gblog/web2py/gluon/restricted.py", line 217, in restricted exec ccode in environment File "/home/

Re: [web2py] Re: Virtual Field and sqlform.grid

2013-11-21 Thread Tim Richardson
On Thursday, November 21, 2013 11:29:36 PM UTC+11, Eduardo Cruz wrote: > > I does not work, sadly. > Where does it fail? is the id passed to the function ok? > On Wednesday, November 20, 2013 6:52:56 PM UTC-4, Tim Richardson wrote: >> >> Also, my experience with virtual fields is limited

Re: [web2py] Re: Virtual Field and sqlform.grid

2013-11-21 Thread Massimo Di Pierro
What do you mean by "does not work"? Can you show a traceback? There should be no problem to returning lists. On Thursday, 21 November 2013 06:29:36 UTC-6, Eduardo Cruz wrote: > > I does not work, sadly. > > On Wednesday, November 20, 2013 6:52:56 PM UTC-4, Tim Richardson wrote: >> >> Also, my ex

Re: [web2py] Re: Virtual Field and sqlform.grid

2013-11-21 Thread Eduardo Cruz
I does not work, sadly. On Wednesday, November 20, 2013 6:52:56 PM UTC-4, Tim Richardson wrote: > > Also, my experience with virtual fields is limited to returning > non-iterable types, not lists. > > On Thursday, November 21, 2013 9:48:57 AM UTC+11, Tim Richardson wrote: >> >> I can't see what'

Re: [web2py] Re: Virtual Field and sqlform.grid

2013-11-20 Thread Tim Richardson
Also, my experience with virtual fields is limited to returning non-iterable types, not lists. On Thursday, November 21, 2013 9:48:57 AM UTC+11, Tim Richardson wrote: > > I can't see what's wrong. > Why don't you simply pass the id > (ie lambda row: get_category_list(row.Post.id) > >> > > and

Re: [web2py] Re: Virtual Field and sqlform.grid

2013-11-20 Thread Tim Richardson
I can't see what's wrong. Why don't you simply pass the id (ie lambda row: get_category_list(row.Post.id) > and then use breakpoints to see if that is working as you expect -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source cod

Re: [web2py] Re: Virtual Field and sqlform.grid

2013-11-20 Thread Eduardo Cruz
def posts(): grid = SQLFORM.grid(db.Post) return dict(grid=grid)Ingresar el código aquí... Sure. El miércoles, 20 de noviembre de 2013 17:49:33 UTC-4, Tim Richardson escribió: > > can you show how you make the grid? >> >> -- Resources: - http://web2py.com - http://web2py.com/book (

Re: [web2py] Re: Virtual Field and sqlform.grid

2013-11-20 Thread Tim Richardson
can you show how you make the grid? > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Goo

Re: [web2py] Re: Virtual Field and sqlform.grid

2013-11-20 Thread Eduardo Cruz
Web2py Version 2.7.4-stable+timestamp.2013.10.14.15.16.29 On 20 November 2013 16:26, Tim Richardson wrote: > What version of web2py? > > > On Thursday, November 21, 2013 5:26:23 AM UTC+11, Eduardo Cruz wrote: >> >> Whe I use a table that has some a virtual field sqlform.grid does not >> works

[web2py] Re: Virtual Field and sqlform.grid

2013-11-20 Thread Tim Richardson
What version of web2py? On Thursday, November 21, 2013 5:26:23 AM UTC+11, Eduardo Cruz wrote: > > Whe I use a table that has some a virtual field sqlform.grid does not works > > 'Row' object has no attribute 'unknown' > > and that happens only when the virtual field is uncommented > > def get_cat