Changeset 5012 for main


Ignore:
Timestamp:
4 Feb 2010, 17:28:28 (15 years ago)
Author:
uli
Message:

Get rid of last waeup.sirp.university reference outside university and
browser subpackage :-)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/utils/converters.txt

    r5005 r5012  
    663663token value of a term.
    664664
    665 Using the ;meth:`toString()` will deliver the token for us:
     665Using the :meth:`toString()` method will deliver the token for us:
    666666
    667667    >>> converter.toString(1)
    668668    '1'
    669669
    670     >>> from waeup.sirp.university.interfaces import ICourse
    671     >>> from zope.schema import getFields
    672     >>> field = getFields(ICourse)['semester']
     670    >>> from waeup.sirp.interfaces import SimpleWAeUPVocabulary
     671    >>> field = Choice(
     672    ...   title = u'Favourite Dish',
     673    ...   default = 0,
     674    ...   vocabulary = SimpleWAeUPVocabulary(
     675    ...        ('N/A', 0), ('Pizza', 1),
     676    ...        ('Cake', 2), ('Muffins', 3)),
     677    ...   required = True,
     678    ...   )
    673679
    674680    >>> converter = ISchemaTypeConverter(field)
Note: See TracChangeset for help on using the changeset viewer.