c.l.w._.Navigation : class documentation

Part of canonical.launchpad.webapp View In Hierarchy

Implements interfaces: zope.publisher.interfaces.browser.IBrowserPublisher

Base class for writing browser navigation components.

Note that the canonical_url part of Navigation is used outside of the browser context.

Method __init__ Initialize with context and maybe with a request.
Method traverse Override this method to handle traversal.
Method redirectSubTree Redirect the subtree to the given target URL.
Method publishTraverse Shim, to set objects in the launchbag when traversing them.
Method all_traversal_and_redirection_names Return the names of all the traversals and redirections defined.
Method stepto_traversals Return a dictionary containing all the stepto names defined.
Method stepthrough_traversals Return a dictionary containing all the stepthrough names defined.
Method redirections Return a dictionary containing all the redirections names defined.
Method browserDefault Undocumented
Method _combined_class_info Walk the class's __mro__ looking for attributes with the given
Method _handle_next_object Do the right thing with the outcome of traversal.
Method _publishTraverse Traverse, like zope wants.
def __init__(self, context, request=None):
Initialize with context and maybe with a request.
def traverse(self, name):
Override this method to handle traversal.

Raise NotFoundError if the name cannot be traversed.

def redirectSubTree(self, target, status=301):
Redirect the subtree to the given target URL.
def publishTraverse(self, request, name):
Shim, to set objects in the launchbag when traversing them.

This needs moving into the publication component, once it has been refactored.

def _combined_class_info(self, attrname):
Walk the class's __mro__ looking for attributes with the given name in class dicts. Combine the values of these attributes into a single dict. Return it.
def _handle_next_object(self, nextobj, request, name):
Do the right thing with the outcome of traversal.

If we have a redirection object, then redirect accordingly.

If we have None, issue a NotFound error.

Otherwise, return the object.

@property
def all_traversal_and_redirection_names(self):
Return the names of all the traversals and redirections defined.
@property
def stepto_traversals(self):
Return a dictionary containing all the stepto names defined.
@property
def stepthrough_traversals(self):
Return a dictionary containing all the stepthrough names defined.
@property
def redirections(self):
Return a dictionary containing all the redirections names defined.
def _publishTraverse(self, request, name):
Traverse, like zope wants.
def browserDefault(self, request):
Undocumented
API Documentation for Launchpad, generated by pydoctor at 2010-09-27 00:00:11.