This documentation covers Review Board 2.5.
You can select a version above or
view the latest documentation.
reviewboard.attachments.models
-
class
FileAttachmentHistory(*args, **kwargs)[source]
Bases: django.db.models.base.Model
Revision history for a single file attachment.
This tracks multiple revisions of the same file attachment (for instance,
when someone replaces a screenshot with an updated version).
-
latest_revision = <djblets.db.fields.RelationCounterField: latest_revision>[source]
-
get_revision_to_id_map()[source]
Return a map from revision number to FileAttachment ID.
-
static
compute_next_display_position(review_request)[source]
Compute the display position for a new FileAttachmentHistory.
-
decrement_latest_revision(model_instance, *args, **kwargs)[source]
-
file_attachments[source]
-
increment_latest_revision(model_instance, *args, **kwargs)[source]
-
objects = <django.db.models.manager.Manager object>[source]
-
reinit_latest_revision(model_instance)[source]
-
reload_latest_revision(model_instance)[source]
-
review_request[source]
-
class
FileAttachment(*args, **kwargs)[source]
Bases: django.db.models.base.Model
A file associated with a review request.
Like diffs, a file can have comments associated with it.
These comments are of type
reviewboard.reviews.models.FileAttachmentComment.
-
file
The descriptor for the file attribute on the model instance. Returns a
FieldFile when accessed so you can do stuff like:
Assigns a file object on assignment so you can do:
>>> instance.file = File(...)
-
repository[source]
-
added_in_filediff[source]
-
attachment_history[source]
-
objects = <reviewboard.attachments.managers.FileAttachmentManager object>[source]
-
mimetype_handler[source]
Return the mimetype handler for this file.
-
review_ui[source]
Return the review UI for this file.
-
thumbnail[source]
Return the thumbnail for display.
-
filename[source]
Return the filename for display purposes.
-
display_name[source]
Return a display name for the file.
-
icon_url[source]
Return the icon URL for this file.
-
is_from_diff[source]
Return if this file attachment is associated with a diff.
-
num_revisions[source]
Return the number of revisions of this attachment.
-
__str__()[source]
-
get_review_request()[source]
Return the ReviewRequest that this file is attached to.
Return all the comments made on this file attachment.
-
get_absolute_url(*moreargs, **morekwargs)[source]
Return the absolute URL to download this file.
-
__unicode__()[source]
Return a string representation of this file for the admin list.
-
drafts[source]
-
inactive_drafts[source]
-
inactive_review_request[source]
-
review_request[source]