Jump to >

reviewboard.attachments.forms

class UploadFileForm(review_request, *args, **kwargs)[source]

Bases: django.forms.forms.Form

A form that handles uploading of new files.

A file takes a path argument and optionally a caption.

DEFAULT_MIMETYPE = u’application/octet-stream’[source]
READ_BUF_SIZE = 1024[source]
__init__(review_request, *args, **kwargs)[source]

Initialize the form.

clean_attachment_history()[source]

Validate that the specified file attachment history exists.

create(filediff=None)[source]

Create a FileAttachment based on this form.

class CommentFileForm(data=None, files=None, auto_id=u’id_%s’, prefix=None, initial=None, error_class=<class ‘django.forms.util.ErrorList’>, label_suffix=None, empty_permitted=False)[source]

Bases: django.forms.forms.Form

A form that handles commenting on a file.

create(file_attachment, review_request)[source]

Create a FileAttachmentComment based on this form.