Re: [SQLObject] date time column default now()
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Ian B. <ia...@co...> - 2004-12-13 22:15:19
|
Brian Ray wrote: > I need help using SQLObject. I am trying to override a column attribute > without actually sending an argument. > > Is there a way I can get a time stamp functionality out of my date time > column default? > > ... > from mx.DateTime import * > class table(SQLObject): > timestamp = DateTimeCol(default=now()) I think you want: timestamp = DateTimeCol(default=now) If you pass a function as the default, that function is called immediately before actually using it. -- Ian Bicking / ia...@co... / http://blog.ianbicking.org |