Jump to >


class ImageReviewUI(review_request, obj)[source]

Bases: reviewboard.reviews.ui.base.FileAttachmentReviewUI

name = 'Image'[source]

The display name for the Review UI.

supported_mimetypes = ['image/*'][source]
allow_inline = True[source]

Whether the Review UI can be rendered inline in diffs and other places.

If set, the Review UI will be able to be displayed within the diff viewer (and potentially other locations).

supports_diffing = True[source]

Whether this Review UI supports diffing two objects.

js_model_class = 'RB.ImageReviewable'[source]

The name of the JavaScript model class to use for the Review UI.

js_view_class = 'RB.ImageReviewableView'[source]

The name of the JavaScript view class to use for the Review UI.


Return the URL to an image used to depict this on other sites.

The returned image URL will be used for services like Facebook, Slack, Twitter, etc. when linking to this file attachment.


The absolute URL to an image used to depict this file attachment.

Return type



Return model data for the JavaScript AbstractReviewable subclass.

This will return information on the file attachment, its history, and any information on an attachment being diffed against.

Subclasses can override this to return additional data.


The attributes to pass to the model.

Return type



Serialize the comments for the Review UI target.

By default, this will return a list of serialized comments, but it can be overridden to return other list or dictionary-based representations, such as comments grouped by an identifier or region. These representations must be serializable into JSON.


comments (list of reviewboard.reviews.models.base_comment.BaseComment) – The list of objects to serialize. This will be the result of get_comments().


The list of serialized comment data.

Return type

list of dict


Return an HTML thumbnail for a comment.

If comment thumbnails are possible for the reviewable object, this function should return HTML for the thumbnail.


comment (reviewboard.reviews.models.base_comment.BaseComment) – The comment to return a thumbnail for.


The HTML for a thumbnail for the comment, or None if one can’t be generated (using the default thumbnailing for the comment type, if one exists).

Return type


__annotations__ = {}