diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-05-31 02:23:51 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-05-31 02:23:51 -0400 |
commit | 55df0be6e087338e26e367a7d9894f741348b8d7 (patch) | |
tree | 1e2df9c9e2878497d81eb09cefcc9a89c4dc1449 | |
parent | 669d125ebd4eca42151fad5d5f0f1684c86086f6 (diff) | |
download | askbot-55df0be6e087338e26e367a7d9894f741348b8d7.tar.gz askbot-55df0be6e087338e26e367a7d9894f741348b8d7.tar.bz2 askbot-55df0be6e087338e26e367a7d9894f741348b8d7.zip |
an unimporant change
-rw-r--r-- | askbot/models/post.py | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/askbot/models/post.py b/askbot/models/post.py index 85e25b72..81edcc6d 100644 --- a/askbot/models/post.py +++ b/askbot/models/post.py @@ -604,23 +604,6 @@ class Post(models.Model): """ return html_utils.strip_tags(self.html)[:max_length] + ' ...' - def format_tags_for_email(self): - """formats tags of the question post for email""" - tag_style = "white-space: nowrap; " \ - + "font-size: 11px; color: #333;" \ - + "background-color: #EEE;" \ - + "border-left: 3px solid #777;" \ - + "border-top: 1px solid #EEE;" \ - + "border-bottom: 1px solid #CCC;" \ - + "border-right: 1px solid #CCC;" \ - + "padding: 1px 8px 1px 8px;" \ - + "margin-right:3px;" - output = '<div>' - for tag_name in self.get_tag_names(): - output += '<span style="%s">%s</span>' % (tag_style, tag_name) - output += '</div>' - return output - def format_for_email(self, quote_level = 0): """format post for the output in email, if quote_level > 0, the post will be indented that number of times @@ -649,13 +632,15 @@ class Post(models.Model): if parent_post is None: break quote_level += 1 + output += '<p>' output += _( - 'In reply to %(user)s %(post)s of %(date)s<br/>' + 'In reply to %(user)s %(post)s of %(date)s' ) % { 'user': parent_post.author.username, 'post': _(parent_post.post_type), 'date': parent_post.added_at.strftime(const.DATETIME_FORMAT) } + output += '</p>' output += parent_post.format_for_email(quote_level = quote_level) current_post = parent_post return output |