diff options
author | luxagraf <sng@luxagraf.net> | 2015-12-03 16:24:36 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2015-12-03 16:24:36 -0500 |
commit | e4a7f290d373427c36d7925e7381aadf16524936 (patch) | |
tree | f38fe76393ddac2d77f653a109ac360fa2fb75d1 /app/books/models.py | |
parent | 657d719bfdc33c8b01a430ea3f58a4907c558f9d (diff) |
switched over to using a single markdown processor from utils everywhere
except notes because I'm urlizing notes and I don't want to do that
anywhere else.
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() |