server/test/data/schema/custom.py
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 10 Jun 2009 18:44:10 +0200
branchstable
changeset 2093 e3aaf61f8c66
parent 1977 606923dff11b
permissions -rw-r--r--
field's help may now be a callable taking the form as argument

"""

:organization: Logilab
:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
"""


class test(AttributeRelationType):
    permissions = {'read': ('managers', 'users', 'guests'),
                   'delete': ('managers',),
                   'add': ('managers',)}

class fiche(RelationType):
    inlined = True
    subject = 'Personne'
    object = 'Card'
    cardinality = '??'

class multisource_rel(RelationDefinition):
    subject = ('Card', 'Note')
    object = 'Note'

class multisource_crossed_rel(RelationDefinition):
    subject = ('Card', 'Note')
    object = 'Note'

class multisource_inlined_rel(RelationType):
    inlined = True
    cardinality = '?*'
    subject = ('Card', 'Note')
    object = ('Affaire', 'Note')


class see_also(RelationDefinition):
    subject = ('Bookmark', 'Note')
    object = ('Bookmark', 'Note')

_euser = import_schema('base').CWUser
_euser.__relations__[0].fulltextindexed = True