l.s.w._.stepthrough(DecoratorAnnotator) : class documentation

Part of lp.services.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:

  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:


See also doc/navigation.txt.

This sets an attribute on the decorated function, equivalent to:

  if decorated.__stepthrough_traversals__ is None:
      decorated.__stepthrough_traversals__ = []

Inherited from DecoratorAnnotator:

Method __init__ Undocumented
Method __call__ Undocumented
API Documentation for Launchpad, generated by pydoctor at 2020-05-28 00:00:14.