summaryrefslogtreecommitdiff
path: root/news/models.py
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-04-16 01:16:52 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-04-16 01:16:52 -0400
commit7aabbe788bb4e26ee9c7cfc0e18692b487e11099 (patch)
treee1032beb86e35caafb164e694d2aa7e2e9664de2 /news/models.py
parent046e6c8b6152a8142ed838e5c406cc04c18f2533 (diff)
parent155bf43a28e404f327a7bcff214c22e212627673 (diff)
Merge branch 'archweb-generic'
Diffstat (limited to 'news/models.py')
-rw-r--r--news/models.py7
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