reviewboard.reviews.views.attachments¶
Views for reviewing file attachments (and legacy screenshots).
- class ReviewFileAttachmentView(**kwargs)[source]¶
Bases:
ReviewRequestViewMixin
,UserProfileRequiredViewMixin
,View
Displays a file attachment with a review UI.
- get(request: HttpRequest, file_attachment_id: int, file_attachment_diff_id: Optional[int] = None, *args, **kwargs) HttpResponse [source]¶
Handle a HTTP GET request.
- Parameters:
request (
django.http.HttpRequest
) – The HTTP request from the client.file_attachment_id (
int
) – The ID of the file attachment to review.file_attachment_diff_id (
int
, optional) – The ID of the file attachment to diff against.*args (
tuple
) – Positional arguments passed to the handler.**kwargs (
dict
) – Keyword arguments passed to the handler.
- Returns:
The resulting HTTP response from the handler.
- Return type:
- __annotations__ = {}¶
- class ReviewScreenshotView(**kwargs)[source]¶
Bases:
ReviewRequestViewMixin
,UserProfileRequiredViewMixin
,View
Displays a review UI for a screenshot.
Screenshots are a legacy feature, predating file attachments. While they can’t be created anymore, this view does allow for reviewing screenshots uploaded in old versions.
- get(request: HttpRequest, screenshot_id: int, *args, **kwargs) HttpResponse [source]¶
Handle a HTTP GET request.
- Parameters:
request (
django.http.HttpRequest
) – The HTTP request from the client.screenshot_id (
int
) – The ID of the screenshot to review.*args (
tuple
) – Positional arguments passed to the handler.**kwargs (
dict
) – Keyword arguments passed to the handler.
- Returns:
The resulting HTTP response from the handler.
- Return type:
- __annotations__ = {}¶