Just a quick idea off the top of my head before going to bed :)
def save(self, *args, **kwargs):
super(MyModel, self).save(*args, **kwargs) # Call the "real"
save() method.
timestamp = os.path.getmtime(self.my_image_field.path)
if datetime.datetime.now() - timestamp < VERY_
Hi,
I have a class with an image field.
Every time the image is changed, I need to resize the image to several formats.
At the moment, I do that every time the class which contains the image is saved.
However, I'd like to improve that a bit and only resize whenever the image has
changed.
Is ther
2 matches
Mail list logo