c.l.u.s.PageMatch : class documentation

Part of canonical.launchpad.utilities.searchservice View In Hierarchy

Implements interfaces: canonical.launchpad.interfaces.searchservice.ISearchResult

See ISearchResult.

A search result that represents a web page.

Method url_rewrite_exceptions A list of launchpad.net URLs that must not be rewritten.
Method url_rewrite_scheme The URL scheme used in rewritten URLs.
Method url_rewrite_hostname The network location used in rewritten URLs.
Method __init__ initialize a PageMatch.
Method _strip_trailing_slash Return the url without a trailing slash.
Method _rewrite_url Rewrite the url to the local environment.
@property
def url_rewrite_exceptions(self):
A list of launchpad.net URLs that must not be rewritten.

Configured in config.google.url_rewrite_exceptions.

@property
def url_rewrite_scheme(self):
The URL scheme used in rewritten URLs.

Configured in config.vhosts.use_https.

@property
def url_rewrite_hostname(self):
The network location used in rewritten URLs.

Configured in config.vhost.mainsite.hostname.

def __init__(self, title, url, summary):
initialize a PageMatch.
ParameterstitleA string. The title of the item.
urlA string. The full URL of the item.
summaryA string. A summary of the item.
def _strip_trailing_slash(self, url):
Return the url without a trailing slash.
def _rewrite_url(self, url):
Rewrite the url to the local environment.

Links with launchpad.net are rewritten to the local hostname, except if the domain matches a domain in the url_rewrite_exceptions. property.

ParametersurlA URL str that may be rewritten to the local launchpad environment.
ReturnsA URL str.
API Documentation for Launchpad, generated by pydoctor at 2010-09-27 00:00:11.