web/test/data/schema/testschema.py
author sylvain.thenault@logilab.fr
Thu, 23 Apr 2009 16:08:40 +0200
branchtls-sprint
changeset 1447 a1ca676294f0
parent 1398 5fe84a5f7035
child 1802 d628defebc17
permissions -rw-r--r--
don't use a singleton rest parser which may leads to concurrency bugs

class Salesterm(EntityType):
    described_by_test = SubjectRelation('File', cardinality='1*', composite='subject')
    amount = Int(constraints=[IntervalBoundConstraint(0, 100)])
    
class tags(RelationDefinition):
    subject = 'Tag'
    object = ('BlogEntry', 'CWUser')

class checked_by(RelationType):
    subject = 'BlogEntry'
    object = 'CWUser'
    cardinality = '?*'
    permissions = {
        'add': ('managers',),
        'read': ('managers', 'users'),
        'delete': ('managers',),
        }