X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/22236fb67da2f27ceb35ad138f4d534a4fd08251..ec62bc84aa89b5e946104bc4dcdf78f382c90165:/forum/models/question.py?ds=sidebyside diff --git a/forum/models/question.py b/forum/models/question.py index 136d3de..5a7786d 100644 --- a/forum/models/question.py +++ b/forum/models/question.py @@ -3,7 +3,7 @@ from tag import Tag from django.utils.translation import ugettext as _ class QuestionManager(NodeManager): - def search(self, keywords): + def search(self, keywords, **kwargs): return False, self.filter(models.Q(title__icontains=keywords) | models.Q(body__icontains=keywords)) class Question(Node): @@ -27,6 +27,9 @@ class Question(Node): @property def headline(self): + return self._headline() + + def _headline(self): if self.nis.deleted: return _('[deleted] ') + self.title