def save(self, *args, **kwargs): if not self.slug: unique_slugify(self, self.name) if not self.short_name: self.short_name = self.name Competition.clear_cache() super().save(*args, **kwargs)
def save(self, *args, **kwargs): if not self.slug: unique_slugify(self, self.name) if not self.short_name: self.short_name = self.name Competition.clear_cache() super().save(*args, **kwargs)
def save(self, *args, **kwargs): cache.delete('featured') unique_slugify(self, self.title) super().save(*args, **kwargs) if self.featured: from apps.post.models import Post Event.objects.exclude(pk=self.pk).update(featured=False) Post.objects.all().update(featured=False)
def save(self, *args, **kwargs): cache.delete('featured') unique_slugify(self, self.title) if not self.id: self.created_at = datetime.datetime.today() super().save(*args, **kwargs) if self.featured: from apps.events.models import Event Post.objects.exclude(pk=self.pk).update(featured=False) Event.objects.all().update(featured=False)
def save(self, *args, **kwargs): cache.delete('featured') unique_slugify(self, self.title) if not self.id: self.created_at = datetime.datetime.today() super().save(*args, **kwargs) if self.featured: from apps.events.models import Event Post.objects.exclude(pk=self.pk).update(featured=False) Event.objects.all().update(featured=False)
def save(self, *args, **kwargs): unique_slugify(self, self.name) super(Person, self).save(*args, **kwargs)
def save(self, *args, **kwargs): if not self.slug: unique_slugify(self, self.headline) super(Timeline, self).save(*args, **kwargs)
def save(self, *args, **kwargs): cache.delete('featured') unique_slugify(self, self.title) if not self.id: self.created_at = datetime.datetime.today() super(Post, self).save(*args, **kwargs)
def save(self, *args, **kwargs): unique_slugify(self, self.user.full_name) super(Person, self).save(*args, **kwargs)
def save(self, *args, **kwargs): unique_slugify(self, self.title) if not self.id: self.created_at = datetime.datetime.today() self.updated_at = datetime.datetime.today() super(Page, self).save(*args, **kwargs)
def save(self, *args, **kwargs): unique_slugify(self, self.name) super(Category, self).save(*args, **kwargs)
def save(self, *args, **kwargs): unique_slugify(self, self.name) super(Partner, self).save(*args, **kwargs)
def save(self, *args, **kwargs): cache.delete('featured') unique_slugify(self, self.title) super(Event, self).save(*args, **kwargs)
def save(self, *args, **kwargs): unique_slugify(self, self.name) super(Album, self).save(*args, **kwargs)
def save(self, *args, **kwargs): unique_slugify(self, self.title) if not self.id: self.created_at = datetime.datetime.today() self.updated_at = datetime.datetime.today() super(Page, self).save(*args, **kwargs)
def save(self, *args, **kwargs): unique_slugify(self, self.name) super(Category, self).save(*args, **kwargs)
def save(self, *args, **kwargs): if not self.slug: unique_slugify(self, self.headline) super(Timeline, self).save(*args, **kwargs)
def save(self, *args, **kwargs): if not self.slug: unique_slugify(self, self.name) super(Competition, self).save(*args, **kwargs)