summaryrefslogtreecommitdiff
path: root/backend/search_indexes.py
blob: 0ec5737e16fc74bcde52fd4f2c9443f6a496d620 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import datetime
from haystack import indexes
from backend.models import SJContent

class SJSettingsModelIndex(indexes.SearchIndex, indexes.Indexable):
    text = indexes.CharField(document=True, use_template=True)

    def get_model(self):
        return SJContent

    def index_queryset(self, using=None):
        return self.get_model().objects.filter(content_type='video')