[Zope3-dev] Re: Vocabulary the next proposal

Gary Poster gary at zope.com
Sat Mar 25 07:46:12 EST 2006


On Mar 25, 2006, at 5:41 AM, Philipp von Weitershausen wrote:
>
> You can, of course, leave this as it is and implement the 'tiks'
> vocabulary as:
>
> def tiksLanguagesVocabulary(context):
>     return LanguagesVocabulary(context, 'tiks')
>
> and then register that as a regular IVocabularyFactory utility, in  
> case
> you're keen on saving lines in Python or just hesitant to create  
> classes.

You then need to do a directlyProvides(tiksLanguagesVocabulary,  
IVocabularyFactory) on the function so that the utility zcml doesn't  
complain.

Gary


More information about the Zope3-dev mailing list