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)
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)