karma_delta = models.SmallIntegerField()

def save(self, *args, **kwargs):
    """
  Modify the save function to calculate the popularity of the Link object
  """
self.link.CalculatePopularity()
super(Vote, self).save(*args, **kwargs)

def __unicode__(self):
    return str(self.karma_delta)
Реализация алгоритма популярности в Django