You can check whether there is instance or not by self.instance .This will tell u that whether it is change (page)or a new object is added.And if it new object then only call ur custom functions.U can also use changeForm function
On Tue, Nov 10, 2009 at 12:39 PM, Ramdas S <ram...@gmail.com> wrote: > Hi, > > I have this app which has an ImageField, where the image needs to be > cropped, resized, and a few effects (all from PIL) are applied on it, the > model looks something like this > > class MidPanel(models.Model): > .... > ..... > image = models.ImageField(upload_to="imgs") > > def save(self): > if self.image: > dosomething(image) > doanother2(self.image) > > > All this is fine. Expect that every time the model is saved, it executes > the manipulation on the image. What I require is an idea where the image > manipulation happens only if the image field is changed, and not unless. How > do I achieve that. > > Someone suggested me to use pre_vae signal, but I am not able to figure an > effcient way.. > > Can someone help.... > > -- > Ramdas S > +91 9342 583 065 > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---