[Zope3-checkins] CVS: Zope3/src/zope/app/renderer - vocabulary.py:1.6

Stephan Richter srichter at cosmos.phy.tufts.edu
Wed Mar 17 16:56:40 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/renderer
In directory cvs.zope.org:/tmp/cvs-serv2718/src/zope/app/renderer

Modified Files:
	vocabulary.py 
Log Message:


Change access of vocabulary.




=== Zope3/src/zope/app/renderer/vocabulary.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/renderer/vocabulary.py:1.5	Sat Mar 13 20:11:39 2004
+++ Zope3/src/zope/app/renderer/vocabulary.py	Wed Mar 17 16:56:39 2004
@@ -19,6 +19,7 @@
 from zope.proxy import removeAllProxies
 from zope.schema.interfaces import \
      ITokenizedTerm, IVocabulary, IVocabularyTokenized
+from zope.schema.vocabulary import getVocabularyRegistry
 from zope.component.interfaces import IFactory
 
 from zope.app import zapi
@@ -69,8 +70,8 @@
 
     def __init__(self, field, request):
         self.request = request
-        vocabs = zapi.getService(field, "Vocabularies")
-        self.vocabulary = vocabs.get(field, "SourceTypes")
+        registry = getVocabularyRegistry()
+        self.vocabulary = registry.get(field, "SourceTypes")
         self.setField(field)
 
     def textForValue(self, term):




More information about the Zope3-Checkins mailing list