From e4a7f290d373427c36d7925e7381aadf16524936 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Thu, 3 Dec 2015 16:24:36 -0500 Subject: 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. --- app/links/models.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'app/links') 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) -- cgit v1.2.3-70-g09d2