django_ocr_server/models.py
def remove_file(self):
        """
        This function removes self.file.sile from a disk if it exists,
        renames self.file.name to 'file_removed' and then saves the model instance
        :return: None
        """
        self.is_saved()  # checking that instance of OCRedFile is saved, raise DoesNotSaved exception otherwise
        if os.path.isfile(self.file.path):
            os.remove(self.file.path)
        self.file.name = getattr(settings, 'OCR_FILE_REMOVED_LABEL', ocr_default_settings.FILE_REMOVED_LABEL)
        OCRedFile.Counters.num_removed_files += 1
        super(OCRedFile, self).save()

        This function removes self.file.sile from a disk if it exists,
        renames self.file.name to 'file_removed' and then saves the model instance
        :return: None
        
This function removes self.file.sile from a disk if it exists,
renames self.file.name to 'file_removed' and then saves the model instance
This function removes self . file . sile from a disk if it exists renames self . file . name to ' file_removed ' and then saves the model instance
def remove_file(self):
        self.is_saved()  
        if os.path.isfile(self.file.path):
            os.remove(self.file.path)
        self.file.name = getattr(settings, 'OCR_FILE_REMOVED_LABEL', ocr_default_settings.FILE_REMOVED_LABEL)
        OCRedFile.Counters.num_removed_files += 1
        super(OCRedFile, self).save()
def remove_file ( self ) : self . is_saved ( ) if os . path . isfile ( self . file . path ) : os . remove ( self . file . path ) self . file . name = getattr ( settings , 'OCR_FILE_REMOVED_LABEL' , ocr_default_settings . FILE_REMOVED_LABEL ) OCRedFile . Counters . num_removed_files += 1 super ( OCRedFile , self ) . save ( )
This function removes self.file.sile from a disk if it exists,
renames self.file.name to 'file_removed' and then saves the model instance
This function removes self . file . sile from a disk if it exists renames self . file . name to ' file_removed ' and then saves the model instance
"""
        This function removes self.file.sile from a disk if it exists,
        renames self.file.name to 'file_removed' and then saves the model instance
        :return: None
        """ # checking that instance of OCRedFile is saved, raise DoesNotSaved exception otherwise
None
self