def html(self): html = cache.get("message/{}/html".format(self.pk)) if not html: html = convert_text_to_html(self.content_plain, self.markup) if self.markup == "bbcode": html = smilify(html) cache.set("message/{}/html".format(self.pk), html, None) return html
def html(self): return convert_text_to_html(self.content, 'markdown')