Пример #1
0
 def update(self, *args, **kwargs):
     value_type = getattr(self.field, 'value_type', None)
     if value_type:
         self.vocabulary = getattr(value_type,
                                   'vocabularyName',
                                   'plone.app.vocabularies.Catalog')
     if self.vocabulary is None:
         self.vocabulary = 'plone.app.vocabularies.Catalog'
     z3cform_TextWidget.update(self, *args, **kwargs)
Пример #2
0
 def update(self, *args, **kwargs):
     if not hasattr(self, 'vocabulary'):
         self.vocabulary = getattr(self.field, 'vocabularyName', None)
     z3cform_TextWidget.update(self, *args, **kwargs)