Guest User

Untitled

a guest
Sep 18th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. Storing pairs of strings inside plone.app.registry
  2. class IMyPair(Interface):
  3. value = schema.TextLine(title=u"value", required=True)
  4. title = schema.TextLine(title=u"title", required=False)
  5.  
  6. class MyPair(object):
  7. implements(IMyPair)
  8. def __init__(self, value='', title=''):
  9. self.value = value
  10. self.title = title
  11.  
  12. class IMyConfigPanel(Interface):
  13.  
  14. entry = schema.List(
  15. title=_(u'Foo'),
  16. value_type=schema.Object(IMyPair, title=u"entry"),
  17. required=True
  18. )
Add Comment
Please, Sign In to add comment