> def save(self): > if self.id is not None: > old_self = self.__class__.get(id = self.id) > if self.id is None or (old_self.city != self.city) or ( > old_self.state != self.state): > self.geocode = self.get_geocode() > super(SiteUser, self).save()
You can also monitor attribute changes via __setattr__, which will save you an additional query. That worked fine for me so far, although I am not 100% if there might not be some edge cases that could cause problems. Michael --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---