diff gpp/gcalendar/models.py @ 128:48621ba5c385

Fixing #36, Smilify doesn't work when a smiley appears first before other text. Refactored the smiley system to produce markdown as well as HTML.
author Brian Neal <bgneal@gmail.com>
date Fri, 20 Nov 2009 01:43:32 +0000
parents 9c18250972d5
children e04d91babfcf
line wrap: on
line diff
--- a/gpp/gcalendar/models.py	Mon Nov 16 01:00:28 2009 +0000
+++ b/gpp/gcalendar/models.py	Fri Nov 20 01:43:32 2009 +0000
@@ -5,8 +5,7 @@
 from django.db.models import Q
 from django.contrib.auth.models import User
 
-from core.markup import markdown
-from smiley import smilify
+from core.markup import site_markup
 
 
 class PendingEventManager(models.Manager):
@@ -92,7 +91,7 @@
         ordering = ('-date_submitted', )
 
     def save(self, *args, **kwargs):
-        self.html = smilify(markdown(self.description))
+        self.html = site_markup(self.description)
         super(Event, self).save(*args, **kwargs)
 
     def needs_approval(self):