##// END OF EJS Templates
Added more parameters to the post xml output
Added more parameters to the post xml output

File last commit:

r692:d0013853 1.8-dev
r828:b99c5139 decentral
Show More
search_indexes.py
24 lines | 616 B | text/x-python | PythonLexer
neko259
Implemented search over posts. Moved get_user and get_theme to utils module. Use context processors instead of creating context in the base view. Removed unused imports in some modules
r690 from haystack import indexes
neko259
Added tag search. Refactored search to show any model results in a list.
r692 from boards.models import Post, Tag
neko259
Implemented search over posts. Moved get_user and get_theme to utils module. Use context processors instead of creating context in the base view. Removed unused imports in some modules
r690
__author__ = 'neko259'
class PostIndex(indexes.SearchIndex, indexes.Indexable):
text = indexes.CharField(document=True, use_template=True)
def get_model(self):
return Post
def index_queryset(self, using=None):
neko259
Added tag search. Refactored search to show any model results in a list.
r692 return self.get_model().objects.all()
class TagIndex(indexes.SearchIndex, indexes.Indexable):
text = indexes.CharField(document=True, use_template=True)
def get_model(self):
return Tag
def index_queryset(self, using=None):
return self.get_model().objects.get_not_empty_tags()