Functions which make interacting with the models easier.
Creates a document and file
user
The user creating the document and file.group
The group creating the document and file.category
models.Category,document_title
Name of the documentfile_name
Name of the filefile_content
File objectmime_type
File mime typefile_size
File sizeadditional_document_attributes
A dictionary containing the optional fields for the document.additional_file_attributes
A dictionary containing the optional fields for the file.
- A tuple containing the created document and file.
Creates a file with thumbnail
document
The document associated with the file.user
The user who created the file.group
The group who created the file.name
Name of the filecontent
File objectmime_type
File mime typesize
File sizeadditional_attributes
Kwargs containing the optional fields for the file.
- The created file object.