Force deep copy of Django FileField object (mainly new file itself)
问题 I have this model: class DocVersion(Commentable): name = models.CharField( 'Version', max_length=100, ) docfile = models.FileField( 'File', upload_to='content/%Y/%m/%d/%H/%M/%S', ) created = models.DateTimeField( 'Created', auto_now_add=True, ) creater = models.ForeignKey( User, ) class Document(DocumentBase): #..... blah ..... versions = models.ManyToManyField( DocVersion, ) In a function in a view, I have this function to do a deep copy of the DocVersion like so: def cp_document(transfer