[Zope] DateTime.now() as default date property ?

Dieter Maurer dieter@handshake.de
Fri, 8 Nov 2002 23:15:31 +0100


tom smith writes:
 > When adding properties to a Zclass I'd like to have a date property 
 > whose default value is now() but when I try to add the property I have 
 > to supply a valid date string. Otherwise it errors
 > 
 > I don't want to enter a time as what I want the value to be is 
 > ZopeTime.now()
 > 
 > How do I do it?
You cannot use it as a default value in the ZClass.
You must set the value explicitly in the instance constructor.


Dieter