DateTime.now() as default date property ?
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? thanks tom -- tom smith http://www.othermedia.com/blog/ 0207 089 5959 3rd Floor, The Pavilion, Newham's Row, London SE1 3UZ
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
participants (2)
-
Dieter Maurer -
tom smith