Back to index

plone3  3.1.7
RefNode.py
Go to the documentation of this file.
00001 from Products.Archetypes.atapi import *
00002 from Products.Archetypes.config import PKG_NAME
00003 
00004 schema = BaseSchema + Schema((
00005     ReferenceField('link',
00006                    relationship="A",
00007                    ),
00008 
00009     ReferenceField('links',
00010                    multiValued=1,
00011                    relationship="B"
00012                    ),
00013 
00014     ReferenceField('adds',
00015                    widget=ReferenceWidget(addable=1),
00016                    allowed_types=('Refnode', ),
00017                    relationship="C",
00018                    multiValued=1,
00019                    required=1,
00020                    ),
00021 
00022     ))
00023 
00024 
00025 class Refnode(BaseContent):
00026     """A simple archetype for testing references. It can point to itself"""
00027     schema = schema
00028 
00029 registerType(Refnode, PKG_NAME)