= PackageRelationshipSet Pages = IPackageReleationshipSet provides a single page, '+render-list', via SimpleView class. This page is incorporated in parent pages with a specific relationship group. Some example of pages using it are: * +builds/+build/1234/$binaryname * $distroseries/+source/$sourcename Let's fill a IPackageRelationshipSet: >>> from lp.soyuz.browser.packagerelationship import PackageRelationshipSet >>> relationship_set = PackageRelationshipSet() >>> relationship_set.add( ... name="foobar", ... operator=">=", ... version="1.0.2", ... url="http://whatever/") >>> relationship_set.add( ... name="test", ... operator="=", ... version="1.0", ... url=None) Note that iterations over PackageRelationshipSet are sorted alphabetically according the relationship 'name': >>> [relationship.name for relationship in relationship_set] ['foobar', 'test'] It will cause all the relationship contents to be rendered in this order. Let's get the view class: >>> from zope.component import queryMultiAdapter >>> from zope.publisher.browser import TestRequest >>> request = TestRequest(form={}) >>> pkg_rel_view = queryMultiAdapter( ... (relationship_set, request), name="+render-list") This view has no methods, so just demonstrate that it renders correctly like: