Em Sat, 31 Oct 2009 11:16:42 -0700 (PDT)
"mr.freeze" <[email protected]> escreveu:
 
> Virtual fields are my new favorite thing. Currently you must call
> setvirtualfields after each select.  What about adding the ability to
> setvirtualfields at the Table level so that any select will call
> setvirtualfields automatically? Pseudocode:
> 
> db.define_table('mytable',Field('cost'),Field('quantity'))
> class ComputedFields:
>     def amount(self):
>         return self.mytable.cost*self.mytable.quantity
> db.mytable.setvirtualfields(total=ComputedFields())
> 
> What do you think?

Hi,

+1 for me, i liked this syntax and it seems very easy to understand.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to