File: search_indexes.py

package info (click to toggle)
celery-haystack 0.10-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 184 kB
  • sloc: python: 322; makefile: 8
file content (12 lines) | stat: -rw-r--r-- 310 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
from haystack import indexes

from .models import Note
from ..indexes import CelerySearchIndex


# Simplest possible subclass that could work.
class NoteIndex(CelerySearchIndex, indexes.Indexable):
    text = indexes.CharField(document=True, model_attr='content')

    def get_model(self):
        return Note