Exemplo n.º 1
0
 def save(self, *args, **kwargs):
     s = self.name
     if self.state:
         s += '-' + self.state.name
     if self.country:
         s += '-' + self.country.name
     self.slug = slugify(s, instance=self)
     super(City, self).save(*args, **kwargs)
Exemplo n.º 2
0
 def save(self, *args, **kwargs):
     self.slug = slugify(self.name, instance=self)
     super(Continent, self).save(*args, **kwargs)
Exemplo n.º 3
0
 def save(self, *args, **kwargs):
     s = self.name
     if self.code:
         s += '-' + self.code
     self.slug = slugify(self.name, instance=self)
     super(Currency, self).save(*args, **kwargs)
Exemplo n.º 4
0
 def save(self, *args, **kwargs):
     self.slug = slugify(self.name, instance=self)
     super(Ocean, self).save(*args, **kwargs)
Exemplo n.º 5
0
 def save(self, *args, **kwargs):
     if not self.full_name:
         self.full_name = self.name
     self.slug = slugify(self.name, instance=self)
     super(Country, self).save(*args, **kwargs)
Exemplo n.º 6
0
 def save(self, *args, **kwargs):
     s = self.name
     if self.dialect:
         s += '-' + self.dialect
     self.slug = slugify(self.name, instance=self)
     super(Language, self).save(*args, **kwargs)