On 15 April 2011 15:18, Massimo Di Pierro <[email protected]>wrote:
> You are passing a uuid, not a uuid function therefore it is always the
> same value:
>
> try replace
>
> default=uuid.uuid4()
>
> with
>
> default=uuid.uuid4
> or
> default=lambda:uuid.uuid4()
> or
> default=lambda:str(uuid.uuid4())
>
> they should all work.
>
Thanks. In that case the example in the book is wrong:
db.define_table('person',
Field <http://web2py.com/book/default/docstring/Field>('uuid',
length=64, default=uuid.uuid4()),
Field <http://web2py.com/book/default/docstring/Field>('modified_on',
'datetime', default=now),
Field <http://web2py.com/book/default/docstring/Field>('name'),
format='%(name)s')
Regards
Johann
--
May grace and peace be yours in abundance through the full knowledge of God
and of Jesus our Lord! His divine power has given us everything we need for
life and godliness through the full knowledge of the one who called us by
his own glory and excellence.
2 Pet. 1:2b,3a