diff options
Diffstat (limited to 'app/books/models.py')
-rw-r--r-- | app/books/models.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/books/models.py b/app/books/models.py index f5a4a04..d6cd9cf 100644 --- a/app/books/models.py +++ b/app/books/models.py @@ -4,8 +4,7 @@ from django.utils.encoding import force_text from django.conf import settings from django.template.defaultfilters import slugify -# http://freewisdom.org/projects/python-markdown/ -import markdown +from utils.widgets import markdown_to_html class Book(models.Model): @@ -59,7 +58,7 @@ class Book(models.Model): def save(self, *args, **kwargs): if self.body_markdown: - self.body_html = markdown.markdown(self.body_markdown, extensions=['extra'], safe_mode=False) + self.body_html = markdown_to_html(self.body_markdown) self.slug = slugify(self.title[:50]) super(Book, self).save() |