Mercurial > public > sg101
diff gpp/forums/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 | f7a6b8fe4556 |
line wrap: on
line diff
--- a/gpp/forums/models.py Mon Nov 16 01:00:28 2009 +0000 +++ b/gpp/forums/models.py Fri Nov 20 01:43:32 2009 +0000 @@ -6,8 +6,8 @@ from django.db import models from django.db.models import Q from django.contrib.auth.models import User, Group -from core.markup import markdown -from smiley import smilify + +from core.markup import site_markup POST_EDIT_DELTA = datetime.timedelta(seconds=3) @@ -252,7 +252,7 @@ return self.summary() def save(self, *args, **kwargs): - self.html = smilify(markdown(self.body)) + self.html = site_markup(self.body) super(Post, self).save(*args, **kwargs) def delete(self, *args, **kwargs):