On May 22, 2006, at 2:40 PM, Achim Domma wrote:

Hi,

I have written this simple content object:

class IArticle(Interface):
    title = TextLine(
        title=u"Title",
        description=u"The title",
        default=u"",
        required=True)

    body = Text(
        title=u"Body",
        description=u"Article Body",
        default=u"",
        required=True)

class Article(object):
    implements(IArticle)
    title=u''
    body=u''

The body of the article is rendered as restructured text. I can create and edit articles via the automatically generated forms. Everything worked fine, but currently my changes are not persistent if I restart the server. The body is not empty after restart, but holds an older version. I'm working with the SVN version of Zope 3.

Any hint what I might be doing wrong?

hi there

You could try making "Acrticle" inherit from "Persistent". That would would involve something like this:

from persistent import Persistent

class Article(Persistent):
    implements(IArticle)
    title=u''
    body=u''

hope that helps

-jachin



regards,
Achim

_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to