[Checkins] SVN: zope.schema/trunk/ Add ``vocabularyName`` attribute to the ``IChoice`` interface, change "vocabulary" attribute description to be more sensible.
Dan Korostelev
nadako at gmail.com
Tue Mar 10 07:28:14 EDT 2009
Log message for revision 97797:
Add ``vocabularyName`` attribute to the ``IChoice`` interface, change "vocabulary" attribute description to be more sensible.
Changed:
U zope.schema/trunk/CHANGES.txt
U zope.schema/trunk/src/zope/schema/interfaces.py
-=-
Modified: zope.schema/trunk/CHANGES.txt
===================================================================
--- zope.schema/trunk/CHANGES.txt 2009-03-10 11:17:10 UTC (rev 97796)
+++ zope.schema/trunk/CHANGES.txt 2009-03-10 11:28:13 UTC (rev 97797)
@@ -7,6 +7,9 @@
- Add an interface for ``DottedName`` field.
+- Add ``vocabularyName`` attribute to the ``IChoice`` interface, change
+ "vocabulary" attribute description to be more sensible.
+
3.5.3 (2009-03-10)
------------------
Modified: zope.schema/trunk/src/zope/schema/interfaces.py
===================================================================
--- zope.schema/trunk/src/zope/schema/interfaces.py 2009-03-10 11:17:10 UTC (rev 97796)
+++ zope.schema/trunk/src/zope/schema/interfaces.py 2009-03-10 11:28:13 UTC (rev 97797)
@@ -386,14 +386,21 @@
Only one, values or vocabulary, may be specified for a given choice.
"""
- vocabulary = Attribute(
- "vocabulary",
- ("IBaseVocabulary to be used, or vocabulary name, or None.\n"
- "\n"
- "If a string, the vocabulary name should be used by an\n"
- "IVocabularyRegistry to locate an appropriate\n"
- "IBaseVocabulary object."))
+ vocabulary = Field(
+ title=_(u"Vocabulary or source providing values"),
+ description=_(u"The ISource, IContextSourceBinder or IBaseVocabulary "
+ u"object that provides values for this field."),
+ required=False,
+ default=None
+ )
+ vocabularyName = TextLine(
+ title=_(u"Vocabulary name"),
+ description=_(u"Vocabulary name to lookup in the vocabulary registry"),
+ required=False,
+ default=None
+ )
+
# Collections:
# Abstract
More information about the Checkins
mailing list