Search by entering the line in Django + Haystack + Whoosh
📁 python, trabalho
Existe um determinado modelo. Ele armazena os nomes dos filmes. Aqui está a classe de índice:
from haystack import indexes
from kino.films.models import films
class FilmsIndex (indexes.SearchIndex, indexes.Indexable):
text = indexes.CharField(document=true, use_template=true)
rusname = indexes.CharField(model_attr='osname')
origname = indexes.CharField(model_attr='origname')
year = indexes.IntegerField(model_attr='year')