Mercurial > public > sg101
comparison gpp/downloads/models.py @ 221:8d13baeaa5c1
#51; add downloads to Haystack search.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 06 Jun 2010 20:19:10 +0000 |
parents | 77b606e0ad5f |
children | 27bee3ac85e6 |
comparison
equal
deleted
inserted
replaced
220:71fd8454688b | 221:8d13baeaa5c1 |
---|---|
111 total_score += vote_value | 111 total_score += vote_value |
112 self.total_votes += 1 | 112 self.total_votes += 1 |
113 self.average_score = total_score / self.total_votes | 113 self.average_score = total_score / self.total_votes |
114 return self.average_score | 114 return self.average_score |
115 | 115 |
116 def search_title(self): | |
117 return self.title | |
118 | |
119 def search_summary(self): | |
120 return self.description | |
121 | |
116 | 122 |
117 class AllowedExtensionManager(models.Manager): | 123 class AllowedExtensionManager(models.Manager): |
118 def get_extension_list(self): | 124 def get_extension_list(self): |
119 return self.values_list('extension', flat=True) | 125 return self.values_list('extension', flat=True) |
120 | 126 |