[web2py] Re: SQLFORM and Virtual fields (2.9.6 - 2.9.11)

2014-09-24 Thread Leonel Câmara
There's something odd going on but I don't think it's that commit or SQLFORM's fault. Because if I do *list(table)* I don't get the Virtual Fields whereas if I do *table.items()* or iteritems I do. Hence why the grid uses iteritems to show the virtual fields too. -- Resources: -

[web2py] Re: SQLFORM and Virtual fields (2.9.6 - 2.9.11)

2014-09-24 Thread Anthony
Yes, it looks like previously you could pass the name of a virtual field to the fields argument of SQLFORM, but it no longer works (you now have to use extra_fields). I'm not sure why this change was made, but I would say it does break backward compatibility. Anthony On Wednesday, September

[web2py] Re: SQLFORM and Virtual fields (2.9.6 - 2.9.11)

2014-09-24 Thread Leonel Câmara
I think the bug here is that Table.__iter__ doesn't return the same thing as the first positions on the tuples coming from Table.items this is a very odd and unexpected behavior. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Re: SQLFORM and Virtual fields (2.9.6 - 2.9.11)

2014-09-24 Thread Niphlod
once again, 2 months later I didn't even know of an extra_fields argument to SQLFORM. To be fair, though, I always though about virtual fields as something you need to show, not something you need to fill. By definition virtual Fields are something that closely follow the functionality of

[web2py] Re: SQLFORM and Virtual fields (2.9.6 - 2.9.11)

2014-09-24 Thread Anthony
By definition virtual Fields are something that closely follow the functionality of computed fields, but have the feature (I wouldn't dare to say added benefit) to be calculated at each time, and not stored in the db. First, there are readonly forms -- no reason not to include virtual

[web2py] Re: SQLFORM and Virtual fields (2.9.6 - 2.9.11)

2014-09-24 Thread Niphlod
Ok, good points, but I'd be careful to support something (this or anything else) for a reason resembling it's not prohibited, it worked -- needs to be stable. Bugs can be found, lack of documentation too, it's not said that something built on a bug or a shortcoming of the code should be

[web2py] Re: SQLFORM and Virtual fields (2.9.6 - 2.9.11)

2014-09-24 Thread Anthony
On Wednesday, September 24, 2014 3:32:00 PM UTC-4, Niphlod wrote: Ok, good points, but I'd be careful to support something (this or anything else) for a reason resembling it's not prohibited, it worked -- needs to be stable. Bugs can be found, lack of documentation too, it's not said that