c.l.w._.stepthrough(DecoratorAdvisor) : class documentation

Part of canonical.launchpad.webapp View In Hierarchy

Add the decorated method to stepthrough traversals for a class.

A stepthrough method must take single argument that's the path segment for
the object that it's returning. A common pattern is something like:

  @stepthrough('+foo')
  def traverse_foo(self, name):
      return getUtility(IFooSet).getByName(name)

which looks up an object in IFooSet called 'name', allowing a URL
traversal that looks like:

  launchpad.net/.../+foo/name

See also doc/navigation.txt.

This uses Zope's class advisor stuff to make sure that the path segment
passed to `stepthrough` is handled by the decorated method.

That is::
  cls.__stepthrough_traversals__[argument] = decorated

Inherited from DecoratorAdvisor:

Method __init__ Undocumented
Method __call__ Undocumented
Method getValueToStore Undocumented
Method advise Undocumented
API Documentation for Launchpad, generated by pydoctor at 2010-09-27 00:00:11.