2008-02-28

contenttypevocabulary.py

  2008-02-28 09:52

...

### -*- coding: utf-8 -*- #############################################
#######################################################################
""" Словарь сответствий контентов   

$Id: contenttypevocabulary.py 49799 2008-01-04 17:19:01Z pitch $
"""

__author__  = "Uzorin, 2007"
__license__ = "GPL"
__version__ = "$Revision: 49799 $"

from zope import component
from zope.app.content.interfaces import IContentType
from zope.schema.vocabulary import SimpleTerm, SimpleVocabulary

def contenttypeVocabulary(context):
    lst = [ t[0] for t in component.getUtilitiesFor(IContentType)]
    lst.sort()
    return SimpleVocabulary.fromValues(lst)

Официальный сайт Zope3 Московская группа изучения реактивного движения The Dream Bot Site noooxml