[Zope3-checkins] CVS: Zope3/doc/schema - vocabularies.txt:1.3
Fred L. Drake, Jr.
fred@zope.com
Tue, 15 Jul 2003 12:54:47 -0400
Update of /cvs-repository/Zope3/doc/schema
In directory cvs.zope.org:/tmp/cvs-serv19751/doc/schema
Modified Files:
vocabularies.txt
Log Message:
Add missing methods required by interface.
=== Zope3/doc/schema/vocabularies.txt 1.2 => 1.3 ===
--- Zope3/doc/schema/vocabularies.txt:1.2 Mon Jul 14 09:31:23 2003
+++ Zope3/doc/schema/vocabularies.txt Tue Jul 15 12:54:12 2003
@@ -185,6 +185,12 @@
def __len__(self):
return len(_states)
+ def getQuery(self):
+ return None
+
+ def getTerm(self, value):
+ return _states[value]
+
Using this vocabulary is quite easy. A simple schema for an address
might require the state to be specified::