Exemple #1
0
    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()
Exemple #2
0
    def beforeSave(self):
        if (not self.pub_date and self.published):
            self.pub_date = datetime.datetime.now()

        self.body_html = markdown_pygment(self.body)