Jump to >

reviewboard.admin.server

get_server_url(local_site_name=None, local_site=None, request=None)[source]

Return the URL for the root of the server.

This will construct a URL that points to the root of the server, factoring in whether to use HTTP or HTTPS.

If local_site_name or local_site is provided, then the URL will be the root to the LocalSite’s root, rather than the server’s root.

If request is provided, then the Local Site, if any, will be inferred from the request.

build_server_url(path=None, **kwargs)[source]

Build an absolute URL containing the full URL to the server.

A path can be supplied that will be joined to the server URL.

Parameters:
  • path (unicode) – The path to append to the server URL.
  • **kwargs (dict) – Additional arguments to pass to get_server_url().
Returns:

The resulting URL.

Return type:

unicode

get_hostname()[source]

Return the hostname for this Review Board server.

Returns:The hostname for the server.
Return type:unicode