Search by entering the line in Django + Haystack + Whoosh
📁 Advanced Python Topics, work
There is a certain model. It stores the names of films. Here is the index class:
from haystack import indexes from kino.films.models import films class Filmsindex (indexes.Searchindex, indexes.indexable): text = indexes.charfield (docharfield = true , use_template = true ) rusname = indexes.charfield (model_attr = 'osname' ) Origname = Indexes.Charfield (Model_attr = 'origname' ) year = indexes.integerfield (model_attr = '"year' )
No answers yet.
Log in to leave an answer