Changeset 11

Show
Ignore:
Timestamp:
08/05/05 23:04:00 (7 years ago)
Author:
mj
Message:

Further constrain the keys Sets; this adds a dependency on zope.app that I cannot ever hope to avoid anyway.

Location:
trunk/src/chronolog
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/chronolog/DEPENDENCIES.cfg

    r9 r11  
    11zope.interface 
    22zope.schema 
     3zope.app 
  • trunk/src/chronolog/interfaces.py

    r10 r11  
    1818from zope.interface.common.mapping import IEnumerableMapping 
    1919from zope.schema import Text, TextLine, Date, Timedelta, Set, Int 
     20from zope.app.container.constraints import ContainerTypesConstraint 
    2021 
    2122class ITimeLogKey(Interface): 
     
    9899        description=u'''A set of keys describing the entry against which 
    99100                        time is logged.''', 
    100         required=True) 
     101        required=True, 
     102        min_length=1, 
     103        constraint=ContainerTypesConstraint(ITimeLogKey)) 
    101104             
    102105    date = Date( 
     
    221224        description=u'The keys defining the view on the underlying ' 
    222225                    u'ITimeLogStore.', 
    223         required=True) 
     226        required=True, 
     227        constraint=ContainerTypesConstraint(ITimeLogKey))