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/figments | |
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/figments')
-rw-r--r-- | app/figments/models.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/figments/models.py b/app/figments/models.py index e108e21..b76d8d5 100644 --- a/app/figments/models.py +++ b/app/figments/models.py @@ -7,8 +7,7 @@ from django.contrib.syndication.views import Feed from django.db.models.signals import post_save from django.dispatch import receiver -# http://freewisdom.org/projects/python-markdown/ -import markdown +from utils.widgets import markdown_to_html from .ebook import generate_epub_file @@ -77,7 +76,7 @@ class Figment(models.Model): def save(self, *args, **kwargs): if not self.id and not self.pub_date: self.pub_date = datetime.datetime.now() - self.body_html = markdown.markdown(self.body_markdown, extensions=['extra'], safe_mode=False) + self.body_html = markdown_to_html(self.body_markdown) super(Figment, self).save() |