In stable version there is a simpler way to define virtual fields. See
this: http://web2py.com/examples/default/changelog
On Tue, Dec 18, 2012 at 9:26 AM, at wrote:
> Thanks for your reply; I am trying to use virtual fields but unable to fetch
> records.
>
> my db.py defines:
> db.define_table('
Thanks for your reply; I am trying to use virtual fields but unable to
fetch records.
my db.py defines:
*db.define_table('taxpayer',
Field('enc_name'),
Field('age'),
Field('married', 'boolean'),
Field('spouse_name'),
Field('occupation'))
class MyVirtualFields(object):
def name(self):
retu
I think the most simple option in your situation is use computed fields.
But if you really need to use a SQL function, you should write your
query by hand.
On Thu, Dec 13, 2012 at 3:48 PM, at wrote:
>
> Hi,
>
> Lets say we've a table with name taxpayers; it contains 5 fields. Out of
> these 5,
Hi,
Lets say we've a table with name taxpayers; it contains 5 fields. Out of
these 5, two start with *ar_*.
What I want is to run some special function (say *convertme()* ) on these
two fields starting with *ar_* , while fetching data through DAL, like:
query = (db.taxpayers.id > 10)
result =
4 matches
Mail list logo