Re: [web2py] Callable as Field.default

2011-01-27 Thread Ole Martin Maeland
instead of default=now use default = request.now also change default = now in modified_on to update=request.now regards Martin On Wed, Jan 26, 2011 at 1:36 AM, Bernd Rothert roth...@googlemail.comwrote: A table definition from the DAL chapter of the Web2py book: db.define_table('person',

[web2py] Callable as Field.default

2011-01-25 Thread Bernd Rothert
A table definition from the DAL chapter of the Web2py book: db.define_table('person', Field('uuid', length=64, default=uuid.uuid4()), Field('modified_on', 'datetime', default=now), Field('name'), format='%(name)s') now usually contains the current datetime from request.now and