There are many GAE types that one may want to use. Today I needed
StringListProperty so I extended the web2py GAE apy so that you can
have a field of type
db.define_table('person',Field('names','.StringListProperty()'))
and you can do
db.person.insert(names=['Massimo','Max'])
db(db.person.names=='Massimo').select()
Basically you can put any native type as a web2py type just put it in
a string and start it with a '.'. You can also pass arguments this
way.
It is ugly but works. It is ugly because I'd rather pass an object
than a string. It works because a type has to be a string. It is
experimental because when the new DAL comes this should be replaced by
a better API. This will not stay backward compatible.
Massimo
--
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.