I have two fields in my django model:
class Staff(models.Model):
photo = models.FileField(blank=True, null = True)
encodings = JSONField()
I get the photo from form and after that using this photo get encodings. How can I delete the photo after proccesing it? I tried
self.photo = None or self.photo = ''
but in this case I get "The 'photo' attribute has no file associated with it"