X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/ecd9fa68ea62902f79744b458e4ea2ed95ce00ac..cf4c6f115a98cb8574c9665f34a50ae503a57b79:/forum/models/question.py?ds=sidebyside diff --git a/forum/models/question.py b/forum/models/question.py index a7ecd22..2cb362c 100644 --- a/forum/models/question.py +++ b/forum/models/question.py @@ -1,14 +1,12 @@ from base import * from tag import Tag from django.utils.translation import ugettext as _ -from forum.modules.decorators import decoratable question_view = django.dispatch.Signal(providing_args=['instance', 'user']) class QuestionManager(NodeManager): - @decoratable.method def search(self, keywords): - return self.filter(models.Q(title__icontains=keywords) | models.Q(body__icontains=keywords)) + return False, self.filter(models.Q(title__icontains=keywords) | models.Q(body__icontains=keywords)) class Question(Node): class Meta(Node.Meta): @@ -20,9 +18,9 @@ class Question(Node): friendly_name = _("question") objects = QuestionManager() - #@property - #def closed(self): - # return self.nstate.closed + @property + def closed(self): + return self.nis.closed @property def view_count(self):