Mercurial > public > sg101
changeset 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 | 2f5779e9d8f8 |
files | forums/models.py |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
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''