Jump to >

reviewboard.reviews.forms

regex_validator(value)[source]

Validates that the specified regular expression is valid.

class DefaultReviewerForm(data=None, initial={}, request=None, *args, **kwargs)[source]
clean()[source]

Hook for doing any extra form-wide cleaning after Field.clean() has been called on every field. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field named ‘__all__’.

class GroupForm(data=None, initial={}, request=None, *args, **kwargs)[source]
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

dict

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

dict

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 the reviewboard.reviews.models.review_request. ReviewRequest.

Defaults to False.

Returns

The created DiffSet.

Return type

reviewboard.diffviewer.models.diffset.DiffSet

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.