On Thursday, March 31, 2011 9:33:48 AM UTC-4, Massimo Di Pierro wrote:
>
> please do:
>
> db.define_table('person',Field('person_uuid', notnull=True,
> writable=False, unique=True))
> db.person.person_uuid = lambda:str(uuid.uuid4()))
It should be db.person.person_uuid.default = lambda:str(uuid.uuid4())),
right?
Also, is the lambda and the str necessary? Couldn't you just do:
db.define_table('person',
Field('person_uuid', default=uuid.uuid4, notnull=True, writable=False,
unique=True))
Anthony

