reviewboard¶
Review Board version and package information.
These variables and functions can be used to identify the version of Review Board. They’re largely used for packaging purposes.
- VERSION: tuple[int, int, int, int, str, int, bool] = (8, 0, 0, 0, 'alpha', 0, False)¶
The version of Review Board.
This is in the format of:
(Major, Minor, Micro, Patch, alpha/beta/rc/final, Release Number, Released)
- get_version_string() str [source]¶
Return the Review Board version as a human-readable string.
- Returns:
The Review Board version string.
- Return type:
- get_package_version() str [source]¶
Return the Review Board version as a Python package version string.
- Returns:
The Review Board package version.
- Return type:
- is_release() bool [source]¶
Return whether this is a released version of Review Board.
- Returns:
True if the current version of Review Board is a release.
- Return type:
- get_manual_url() str [source]¶
Return the URL to the Review Board manual for this version.
- Returns:
The URL to the user manual.
- Return type:
- initialize(load_extensions: bool = True, setup_logging: bool = True, setup_templates: bool = True) None [source]¶
Begin initialization of Review Board.
This sets up the logging, generates cache serial numbers, loads extensions, and sets up other aspects of Review Board. Once it has finished, it will fire the
reviewboard.signals.initializing
signal.This must be called at some point before most features will work, but it will be called automatically in a standard install. If you are writing an extension or management command, you do not need to call this yourself.
- Parameters:
load_extensions (
bool
, optional) – Whether extensions should be automatically loaded upon initialization. If set, extensions will only load if the site has been upgraded to the latest version of Review Board.setup_logging (
bool
, optional) – Whether to set up logging based on the configured settings. This can be disabled if the caller has their own logging configuration.setup_templates (
bool
, optional) –Whether to set up state for template rendering. This can be disabled if the caller has no need for template rendering of any kind. This does not prevent template rendering from happening, but may change the output of some templates.
Keep in mind that many pieces of functionality, such as avatars and some management commands, may be impacted by this setting.
- finalize_setup(is_upgrade: bool = False) None [source]¶
Internal function to upgrade internal state after installs/upgrades.
This should only be called by Review Board install or upgrade code.
Changed in version 5.0: Removed the
register_scmtools
argument.New in version 4.0.
- Parameters:
is_upgrade (
bool
, optional) – Whether this is finalizing an upgrade, rather than a new install.