##// END OF EJS Templates
When swapping the form view, move elements of one form instead of swapping 2...
When swapping the form view, move elements of one form instead of swapping 2 different forms with each other.

File last commit:

r692:d0013853 1.8-dev
r698:9dc8a37d 1.8-dev
Show More
search_indexes.py
24 lines | 616 B | text/x-python | PythonLexer
from haystack import indexes
from boards.models import Post, Tag
__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):
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()