def save(self): # Spam check new comments if not self.comment_html: self.spam_check() self.comment_html = markdown_pygment(self.comment, stripimg=True) super(MarkdownComment, self).save()
def beforeSave(self): if (not self.pub_date and self.published): self.pub_date = datetime.datetime.now() self.body_html = markdown_pygment(self.body)