I have tried to add a virtual field to auth_user and I got:
<type 'exceptions.AttributeError'> 'FieldMethod' object has no attribute
'type' *The Code:*
db.auth_user.emails = Field.Virtual(lambda r: r.last_name)
Version web2py™ (2, 4, 1, 'alpha.2', datetime.datetime(2013, 2, 17, 11, 27,
22)) Python Python 2.7.3: D:\Python27\python.exe (prefix: D:\Python27)
1513.
1514.
1515.
1516.
1517.
1518.
1519.
1520.
1521.
if len(tablenames) < 1:
raise SyntaxError('Set: no tables selected')
self._colnames = map(self.expand, fields)
def geoexpand(field):
if isinstance(field.type,str) and field.type.startswith('geometry'):
field = field.st_astext()
return self.expand(field)
sql_f = ', '.join(map(geoexpand, fields))
sql_o = ''
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.