I\'m trying to create a simple photo gallery with the default Django admin. I\'d like to save a sample photo for each gallery, but I don\'t want to keep the filname. Instead
I ran into the same problem. Okm's answer sent me on the right path but it seems to me it is possible to get the same functionality by just overriding the save() method of your Model.
def save(self, *args, **kwargs):
if self.pk is None:
saved_image = self.image
self.image = None
super(Material, self).save(*args, **kwargs)
self.image = saved_image
super(Material, self).save(*args, **kwargs)
This definitely saves the information correctly.