Skip to main content

Traverse to Object by Interface

Project description

Introduction

This product provides a utility that returns a object which provides a given interface. The returned object could be the given object or any object down the path towards the root.

>>> from collective.traverse.interfaces import ITraverse
>>> from somewhere import IMyInterface
>>> root_traverser = getUtility(ITraverse, name="rootTraverser")
>>> myType = root_traverser(self.context, IMyInterface)

Installation

Add this to your buildout:

[buildout]
eggs = collective.traverse
[instance]
zcml = collective.traverse

And then run buildout.

Changelog

collective.traverse - 1.1 [20090605]

  • Fixed a recursion bug when using portal_setup. There, somehow parent == context ;) [Daniel Kraft]

collective.traverse - 1.0 Unreleased

  • Initial package structure. [zopeskel]

Project details


Release history Release notifications | RSS feed

This version

1.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for collective.traverse, version 1.1
Filename, size File type Python version Upload date Hashes
Filename, size collective.traverse-1.1.tar.gz (4.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page