c.l.w.menu : module documentation

Part of canonical.launchpad.webapp

Menus and facets.
Function get_current_view Return the current view or None.
Function get_facet Return the view's facet name.
Class LinkData General links that aren't default links.
Class MenuLink Adapter from ILinkData to ILink.
Class FacetLink Adapter from ILinkData to IFacetLink.
Class MenuBase Base class for facets and menus.
Function escape Performs translation and sanitizes any HTML present in the message.
Function translate_if_i18n Translate an internationalized object, returning the result.
def get_current_view(request=None):
Return the current view or None.
ParametersrequestA IHTTPApplicationRequest. If request is None, the current browser request is used.
ReturnsThe view from requests that provide IHTTPApplicationRequest.
def get_facet(view):
Return the view's facet name.
def escape(message):
Performs translation and sanitizes any HTML present in the message.

A plain string message will be sanitized ("&", "<" and ">" are converted to HTML-safe sequences). Passing a message that provides the IStructuredString interface will return a unicode string that has been properly escaped. Passing an instance of a Zope internationalized message will cause the message to be translated, then santizied.

ParametersmessageThis may be a string, zope.i18n.Message, zope.i18n.MessageID, or an instance of IStructuredString.
def translate_if_i18n(obj_or_msgid):
Translate an internationalized object, returning the result.

Returns any other type of object untouched.

API Documentation for Launchpad, generated by pydoctor at 2010-09-27 00:00:11.