summaryrefslogtreecommitdiff
path: root/app/links
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2015-12-03 16:24:36 -0500
committerluxagraf <sng@luxagraf.net>2015-12-03 16:24:36 -0500
commite4a7f290d373427c36d7925e7381aadf16524936 (patch)
treef38fe76393ddac2d77f653a109ac360fa2fb75d1 /app/links
parent657d719bfdc33c8b01a430ea3f58a4907c558f9d (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/links')
-rw-r--r--app/links/models.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/app/links/models.py b/app/links/models.py
index 2c3480f..d2b6ff7 100644
--- a/app/links/models.py
+++ b/app/links/models.py
@@ -6,15 +6,7 @@ from django.contrib.sitemaps import Sitemap
from django.contrib.syndication.views import Feed
from taggit.managers import TaggableManager
-import markdown
-
-RATINGS = (
- ('1', "1 Star"),
- ('2', "2 Stars"),
- ('3', "3 Stars"),
- ('4', "4 Stars"),
- ('5', "5 Stars"),
-)
+from utils.widgets import markdown_to_html
class Link(models.Model):
@@ -39,7 +31,7 @@ class Link(models.Model):
return reverse("links:detail", kwargs={"slug": self.pk})
def render_description(self):
- return markdown.markdown(self.description, extensions=['extra'], safe_mode=False)
+ return markdown_to_html(self.description)
def get_previous_published(self):
return self.get_previous_by_pub_date(status__exact=1)