Mercurial > public > sg101
diff gpp/comments/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 | 91a01b8b5885 |
line wrap: on
line diff
--- a/gpp/comments/models.py Mon Nov 16 01:00:28 2009 +0000 +++ b/gpp/comments/models.py Fri Nov 20 01:43:32 2009 +0000 @@ -8,8 +8,7 @@ from django.contrib.auth.models import User from django.core import urlresolvers -from core.markup import markdown -from smiley import smilify +from core.markup import site_markup COMMENT_MAX_LENGTH = getattr(settings, 'COMMENT_MAX_LENGTH', 3000) @@ -53,7 +52,7 @@ return u'%s: %s...' % (self.user.username, self.comment[:50]) def save(self, force_insert=False, force_update=False): - self.html = smilify(markdown(self.comment)) + self.html = site_markup(self.comment) super(Comment, self).save(force_insert, force_update) def get_absolute_url(self):