def store(self, update_timestamp=True): if not self.slug: self.slug = slugify(self.title) if not self.created: self.created = datetime.now() if update_timestamp or not self.modified: self.modified = datetime.now() schema.Document.store(self, db)
def store(self, update_timestamp=True): if not self.slug: self.slug = slugify(self.title) if not self.created: self.created = datetime.now() if not self.published: self.published = date.today() if update_timestamp or not self.modified: self.modified = datetime.now() schema.Document.store(self, db) post_stored.send(sender=self)