Computed Field for Dexterity

What if you add a readonly textline or testfield, and add a property to your class?
ie something like

ImALumberjack(zope.interface.Interface):
   isleep = zope.schema.TextLine(readonly=True)

class OK:
  @property
   def isleep(self):
       return u"All night, and I work all day"

I haven't tested this, I'm just guessing this should work :slight_smile:

3 Likes