diff options
author | Dan McGee <dan@archlinux.org> | 2014-12-08 19:52:55 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2014-12-08 19:52:55 -0600 |
commit | 60327d96a687669d8b8842ecf0ac16c11a8f6483 (patch) | |
tree | fe8f5a15f994fd21251bcd9dd41f62e76a7958ad /news/models.py | |
parent | 9faa6d580e73adfe0f3a194b09d7f6b91b80aae9 (diff) |
Upgrade to python-markdown 2.5.2
safe_mode is now deprecated, so adjust things accordingly.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'news/models.py')
-rw-r--r-- | news/models.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/news/models.py b/news/models.py index 985c1088..a66da8d4 100644 --- a/news/models.py +++ b/news/models.py @@ -1,11 +1,11 @@ -import markdown - from django.db import models from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.utils.safestring import mark_safe from django.utils.timezone import now +from main.utils import parse_markdown + class News(models.Model): slug = models.SlugField(max_length=255, unique=True) @@ -22,8 +22,7 @@ class News(models.Model): return '/news/%s/' % self.slug def html(self): - return mark_safe(markdown.markdown( - self.content, safe_mode=self.safe_mode, enable_attributes=False)) + return mark_safe(parse_markdown(self.content, not self.safe_mode)) def __unicode__(self): return self.title |