class Stop(models.Model):
    line = models.CharField(max_length=12)
street = models.CharField(max_length=32, choices=STREET_CHOICES)
order = models.PositiveIntegerField(blank=True, null=True)
location_hash = models.CharField(max_length=32, null=True)

def save(self):
    location_hash = md5('%s@%s' % (self.line, self.street))
if self.location_hash != location_hash:
    self.order = calculate_order(line=self.line, street=self.street)
self.location_hash = location_hash
super(Stop, self).save()
Django: Detecting changes of a set of fields when a model is saved