Mercurial > public > sg101
diff forums/models.py @ 598:2e429e2b7bb6
For issue #15; add date info to forum search results.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 13 Jun 2012 20:46:30 -0500 |
parents | 7d005ebd8deb |
children | 71a671dab55d |
line wrap: on
line diff
--- a/forums/models.py Mon Jun 11 19:59:46 2012 -0500 +++ b/forums/models.py Wed Jun 13 20:46:30 2012 -0500 @@ -247,11 +247,12 @@ def search_title(self): if self.post_count == 1: - post_text = "(1 post)" + post_text = "1 post" else: - post_text = "(%d posts)" % self.post_count + post_text = "%d posts" % self.post_count - return u"%s by %s; %s" % (self.name, self.user.username, post_text) + return u"%s by %s; %s (%s)" % (self.name, self.user.username, post_text, + self.creation_date.strftime('%d-%b-%Y')) def search_summary(self): return u''