let me put it like this:
model.py:
class Task(models.Model): ... seq_file = models.FileField(upload_to=\'files/\', blank=True, null=True) ...
because open method of models.FileField doesn't return anything
you can just use:
task.seq_file.read()
and you don't need calculate path of file for checking if file exist. you can use task.seq_file.path:
if not os.path.isfile(task.seq_file.path): ....