src/pyams_utils/zodb.py
changeset 42 19c2ddd411a1
parent 41 639c16986e44
child 43 e74e5360db32
equal deleted inserted replaced
41:639c16986e44 42:19c2ddd411a1
   152 
   152 
   153 @provider(IVocabularyFactory)
   153 @provider(IVocabularyFactory)
   154 class ZEOConnectionVocabulary(SimpleVocabulary):
   154 class ZEOConnectionVocabulary(SimpleVocabulary):
   155     """ZEO connections vocabulary"""
   155     """ZEO connections vocabulary"""
   156 
   156 
   157     interface = IZEOConnection
       
   158     nameOnly = True
       
   159 
       
   160     def __init__(self, context=None):
   157     def __init__(self, context=None):
   161         terms = [SimpleTerm(name, title=util.name) for name, util in get_utilities_for(IZEOConnection)]
   158         terms = [SimpleTerm(name, title=util.name) for name, util in get_utilities_for(IZEOConnection)]
   162         super(ZEOConnectionVocabulary, self).__init__(terms)
   159         super(ZEOConnectionVocabulary, self).__init__(terms)
   163 
   160 
   164 getVocabularyRegistry().register('PyAMS ZEO connections', ZEOConnectionVocabulary)
   161 getVocabularyRegistry().register('PyAMS ZEO connections', ZEOConnectionVocabulary)