# HG changeset patch # User Brian Neal # Date 1339638390 18000 # Node ID 2e429e2b7bb60c83499e9545b721aea41e45718b # Parent 7d005ebd8deb84daf51ff37233ec3be5b6f3e00f For issue #15; add date info to forum search results. diff -r 7d005ebd8deb -r 2e429e2b7bb6 forums/models.py --- 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''