파일 처리
images = Trained_Image.objects.all() for i,image in enumerate(images) : fileName,ext = os.path.splitext(image.file) dir = os.path.dirname(image.file) oldFile = image.file image.file = '%s/%s%s' %(dir,i,ext) image.box_file = '%s/%s.box' %(dir,i) image.tr_file = '%s/%s.tr' %(dir,i) image.prefix = '%s/%s' %(dir,i) image.save() print(oldFile,image.file,image.box_file,image.tr_file,image.prefix) os.r..
2021.03.27