reviewboard.reviews.forms¶
- class UploadCommitForm(review_request, *args, **kwargs)[source]¶
A specialized UploadCommitForm for interacting with review requests.
- clean()[source]¶
Clean the form.
- Returns
The cleaned form data.
- Return type
- Raises
django.core.exceptions.ValidationError – The form failed validation.
- class UploadDiffForm(review_request, request=None, *args, **kwargs)[source]¶
A specialized UploadDiffForm for interacting with review requests.
- clean()[source]¶
Clean the form.
This ensures that the associated review request was not created with history.
- Returns
The cleaned form data.
- Return type
- Raises
django.core.exceptions.ValidationError – The form cannot be validated.
- create(attach_to_history=False)[source]¶
Create the DiffSet and optionally attach it to the history.
- Parameters
attach_to_history (bool) –
Whether or not the created
DiffSet
will be attached to the diffset history of thereviewboard.reviews.models.review_request. ReviewRequest
.Defaults to
False
.- Returns
The created DiffSet.
- Return type
- class UploadScreenshotForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)[source]¶
A form that handles uploading of new screenshots. A screenshot takes a path argument and optionally a caption.