def save(self): #create a random score... if not hasattr(self, 'score'): self.score = random.randint(0, 100) IndexedObject.save(self)
def __init__(self, **kwargs): IndexedObject.__init__(self, **kwargs) self.registrationDate = int(kwargs.get('registrationDate', time.time()))