Ignore:
Timestamp:
20 Jul 2010, 14:54:04 (14 years ago)
Author:
uli
Message:

Experiments with IObject field type.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/branches/ulif-fasttables/src/waeup/sirp/jambtables/interfaces.py

    r5269 r5271  
    2626from zope import schema
    2727
     28
    2829class IJAMBDataTable(IWAeUPObject):
    2930    """A table containing JAMB data.
     
    6465        `username` - the (optional) username of the importing person.
    6566        """
    66 
     67       
     68class IResultEntry(IWAeUPObject):
     69    subject = schema.TextLine(
     70        title = u'Subject',
     71        description = u'The subject',
     72        required=False,
     73        )
     74    score = schema.TextLine(
     75        title = u'Score',
     76        description = u'The score',
     77        required=False,
     78        )
     79       
    6780class IApplicant(IWAeUPObject):
    6881    """An applicant.
     
    199212        required = False,
    200213        )
    201     fst_sit_results = schema.TextLine(
    202         # XXX: Should be nested list of choices
     214    #fst_sit_results = schema.TextLine(
     215    #    # XXX: Should be nested list of choices
     216    #    title = u'Results',
     217    #    required = False,
     218    #    )
     219   
     220    fst_sit_results = schema.List(
    203221        title = u'Results',
    204222        required = False,
    205         )
     223        value_type = schema.Object(
     224            title = u'Entries',
     225            schema = IResultEntry,
     226            )
     227        )
     228   
     229    #fst_sit_results = schema.Object(
     230    #    title = u'Results',
     231    #    required = False,
     232    #    schema = IResultEntry,
     233    #    )
     234
     235    #fst_sit_results = schema.Dict(
     236    #    title = u'Results',
     237    #    required = False,
     238    #    key_type = schema.TextLine(
     239    #        title = u'Subject',
     240    #        ),
     241    #    value_type = schema.TextLine(
     242    #        title = u'Score',
     243    #        ),
     244    #    )
     245
    206246    #
    207247    # Second sitting data
Note: See TracChangeset for help on using the changeset viewer.