Ejemplo n.º 1
0
 def save(self, **kwargs):
     if not self.id:
         phrase = "{0} {1} {2}".format(self.player.username, self.name, datetime.now())
         self.guid = generate_secret_token(phrase)
     super(Item, self).save(**kwargs)
Ejemplo n.º 2
0
 def save(self, **kwargs):
     if not self.id:
         phrase = "{0} {1} {2}".format(self.character.name, self.name, datetime.now())
         self.guid = generate_secret_token(phrase)
     self.slug = "{0}-{1}".format(slugify(self.name)[:35], self.guid)
     super(SpellSchool, self).save(**kwargs)