reviewboard.licensing.views¶
Views for managing licenses.
New in version 7.1.
- class LicensesView(**kwargs)[source]¶
Bases:
ContextMixin,ViewDisplays and processes information on known product licenses.
Upon loading, the licenses will be checked for any updates and updated if needed.
Actions on licenses can be performed by sending HTTP POST requests to this view with the following form data:
action:The name of the action.
action_target:A generated unique ID for the license for the purpose of this view.
All actions are considered internal and are subject to change. There are no API stability guarantees.
The following actions are supported:
license-update-check:Generates data for a license update check request to a separate licensing server. This is used for automatic license updates.
process-license-update:Process a license update payload from a separate licensing server. This is used for automatic license updates.
It takes the following form data:
check_request_data:The license update check request data originally generated during the
license-update-checkaction.check_response_data:The payload from the licensing server.
upload-license:Uploads new data for a license, if supported by the License Provider.
It takes the following form data:
license_data:The new license data.
New in version 7.1.
- get(request: HttpRequest, *args, **kwargs) HttpResponse[source]¶
Handle HTTP GET requests.
This will display each known license, and handle auto-updating the licenses if supported by the License Providers.
- Parameters:
request (
django.http.HttpRequest) – The HTTP request from the client.*args (
tuple, unused) – Unused positional arguments passed to the handler.**kwargs (
dict, unused) – Unused keyword arguments passed to the handler.
- Returns:
The HTTP response for the page.
- Return type:
- post(request: HttpRequest, *args, **kwargs) HttpResponse[source]¶
Handle HTTP POST requests.
This will handle requests for license actions, dispatching out to the right action handler and returning a JSON payload of the results.
- Parameters:
request (
django.http.HttpRequest) – The HTTP request from the client.*args (
tuple, unused) – Unused positional arguments passed to the handler.**kwargs (
tuple, unused) – Unused keyword arguments passed to the handler.
- Returns:
The HTTP response for the page.
- Return type:
- dispatch(request, *args, **kwargs)¶