[Zope3-Users] Default value for an interface attribute

Douglas Douglas replaceafill at yahoo.com
Thu Mar 1 10:06:09 EST 2007


Hi everybody.

I have this interface:

class INews(IPage):
    """A news page for the application.
    """

    date = Date(
        title=_(u"Publication Date"),
        description=_(u"The intended date for this news"),
        default=date.today(),
        required=False
        )

My problem is that I started the instance on February 21, and when I use an
AddForm for this interface, my form shows that date instead of today's date,
which is what I need.

It seems like the default attribute is set once upon server start and then
never changed. Is that the case? If it is, could you please point me to a
better approach for this?

Thanks.


 
____________________________________________________________________________________
Want to start your own business?
Learn how on Yahoo! Small Business.
http://smallbusiness.yahoo.com/r-index


More information about the Zope3-users mailing list