Changeset 7763 for main/waeup.sirp
- Timestamp:
- 7 Mar 2012, 07:55:51 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/branches/ulif-schoolgrades/src/waeup/sirp/schema/field.py
r7263 r7763 18 18 """Special fields. 19 19 """ 20 from zope.interface import implements 21 from zope.schema import TextLine 20 from zope.interface import implements, implementer 21 from zope.schema import TextLine, Object 22 22 from zope.schema.interfaces import ( 23 23 ITextLine, IBaseVocabulary, ISource, IContextSourceBinder, InvalidValue,) 24 24 from zope.schema.vocabulary import ( 25 25 SimpleVocabulary, getVocabularyRegistry, VocabularyRegistryError) 26 from waeup.sirp.schema.interfaces import ISchoolGradeEntry 26 27 27 28 class CustomizableErrorMsg(object): … … 125 126 raise InvalidValue(value) 126 127 return 128 129 class MultiValObject(Object): 130 """A zope.schema.Object-like field for content types with several values. 131 132 You can use it like this in interface definitions:: 133 134 myattr = MultiValObject( 135 schema = IMyComplexType 136 ) 137 138 See :mod:`zope.schema` for further infos about `Object`. 139 140 As multi-value objects should normally be rendered different in 141 forms than single value objects, we need a different schema 142 definition for these. 143 144 In waeup.sirp we also provide widgets that render MultiValObjects 145 automatically. 146 """ 147 implements(IMultiValObject)
Note: See TracChangeset for help on using the changeset viewer.