reviewboard.attachments.managers¶
-
class
FileAttachmentManager
[source]¶ Bases:
django.db.models.manager.Manager
Manages FileAttachment objects.
Adds utility functions for looking up FileAttachments based on other objects.
-
create_from_filediff
(filediff, from_modified=True, save=True, **kwargs)[source]¶ Create a new FileAttachment for a FileDiff.
FileAttachments created from a FileDiff are used to represent changes to binary files which would otherwise not be displayed with the diff.
An individual FileAttachment can represent either the original or modified copy of the file. If ‘from_modified’ is True, then the FileAttachment will be created using the information (filename, revision, etc.) for the modified version. If it is False, the FileAttachment will be created using the information for the original version.
-