c.l.w.t.ObjectFormatterAPI : class documentation

Part of canonical.launchpad.webapp.tales View In Hierarchy

Known subclasses: canonical.launchpad.webapp.tales.BranchFormatterAPI, canonical.launchpad.webapp.tales.BugTrackerFormatterAPI, canonical.launchpad.webapp.tales.BugWatchFormatterAPI, canonical.launchpad.webapp.tales.CustomizableFormatter, canonical.launchpad.webapp.tales.LanguageFormatterAPI, canonical.launchpad.webapp.tales.LinkFormatterAPI, canonical.launchpad.webapp.tales.PackageBuildFormatterAPI, canonical.launchpad.webapp.tales.PackageDiffFormatterAPI, canonical.launchpad.webapp.tales.PersonFormatterAPI, canonical.launchpad.webapp.tales.POFileFormatterAPI, canonical.launchpad.webapp.tales.ProductReleaseFileFormatterAPI, canonical.launchpad.webapp.tales.SeriesSourcePackageBranchFormatter, canonical.launchpad.webapp.tales.TranslationGroupFormatterAPI, lp.code.browser.diff.DiffFormatterAPI

Implements interfaces: zope.traversing.interfaces.ITraversable

Adapter for any object to a formatted string.
Method __init__ Undocumented
Method url Return the object's canonical URL.
Method api_url Return the object's (partial) canonical web service URL.
Method traverse Undocumented
Method link Return an HTML link to the object's page.
Method public_private_css Return the CSS class that represents the object's privacy.
Method pagetitle The page title to be used.
def __init__(self, context):
Undocumented
def url(self, view_name=None, rootsite=None):
Return the object's canonical URL.
Parametersview_nameIf not None, return the URL to the page with that name on this object.
rootsiteIf not None, return the URL to the page on the specified rootsite. Note this is available only for subclasses that allow specifying the rootsite.
def api_url(self, context):
Return the object's (partial) canonical web service URL.

This method returns everything that goes after the web service version number. Effectively the canonical URL but only the relative part with no site.

def traverse(self, name, furtherPath):
Undocumented
def link(self, view_name, rootsite=None):
Return an HTML link to the object's page.

The link consists of an icon followed by the object's name.

Parametersview_nameIf not None, the link will point to the page with that name on this object.
rootsiteIf not None, return the URL to the page on the specified rootsite. Note this is available only for subclasses that allow specifying the rootsite.
def public_private_css(self):
Return the CSS class that represents the object's privacy.
def pagetitle(self):
The page title to be used.

By default, reverse breadcrumbs are always used if they are available. If not available, then the view's .page_title attribute or entry in pagetitles.py (deprecated) is used. If breadcrumbs are available, then a view can still choose to override them by setting the attribute .override_title_breadcrumbs to True.

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