##// END OF EJS Templates
Fixed search indexes for tags
neko259 -
r914:000a8767 default
parent child Browse files
Show More
@@ -1,24 +1,24 b''
1 1 from haystack import indexes
2 2 from boards.models import Post, Tag
3 3
4 4 __author__ = 'neko259'
5 5
6 6
7 7 class PostIndex(indexes.SearchIndex, indexes.Indexable):
8 8 text = indexes.CharField(document=True, use_template=True)
9 9
10 10 def get_model(self):
11 11 return Post
12 12
13 13 def index_queryset(self, using=None):
14 14 return self.get_model().objects.all()
15 15
16 16
17 17 class TagIndex(indexes.SearchIndex, indexes.Indexable):
18 18 text = indexes.CharField(document=True, use_template=True)
19 19
20 20 def get_model(self):
21 21 return Tag
22 22
23 23 def index_queryset(self, using=None):
24 return self.get_model().objects.get_not_empty_tags()
24 return self.get_model().objects.all()
General Comments 0
You need to be logged in to leave comments. Login now