nti.schema.vocabulary

Vocabularies and factories for use in schema fields.

When this package is configured (via configure.zcml) there will be a schema vocabulary named Countries available:

>>> from nti.schema.field import Choice
>>> from zope import interface

>>> class IA(interface.Interface):
...      choice = Choice(title=u"Choice",
...                      vocabulary="Countries")
class CountryTerm(*args, **kwargs)[source]

Bases: zope.schema.vocabulary.SimpleTerm

A titled, tokenized term representing a country. The token is the ISO3166 country code. The flag value is a browserresource path to an icon representing the country.

classmethod fromItem(item)[source]
toExternalObject()[source]
CountryVocabularyFactory(context)[source]

A vocabulary factory.