Changeset 4512 for waeup/branches/ulif-rewrite
- Timestamp:
- 1 Aug 2009, 08:35:43 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/branches/ulif-rewrite/src/waeup/interfaces.py
r4509 r4512 3 3 from zope.interface import Interface, Attribute 4 4 from zope import schema 5 from zope.schema.vocabulary import SimpleVocabulary 5 from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm 6 6 from waeup.permissions import RoleSource 7 8 def SimpleWAeUPVocabulary(*terms): 9 """A well-buildt vocabulary provides terms with a value, token and 10 title for each term 11 """ 12 return SimpleVocabulary([ 13 SimpleTerm(value, value, title) for title, value in terms]) 7 14 8 15 class IWAeUPObject(Interface): … … 157 164 title = u'Semester/Term', 158 165 default = 0, 159 vocabulary = Simple Vocabulary.fromItems([160 161 ('Second Semester', 2), ('Combined', 3),]),166 vocabulary = SimpleWAeUPVocabulary( 167 ('N/A', 0), ('First Semester', 1), 168 ('Second Semester', 2), ('Combined', 3)), 162 169 required = True, 163 170 )
Note: See TracChangeset for help on using the changeset viewer.