X-Git-Url: https://git.mdrn.pl/prawokultury.git/blobdiff_plain/fac024263e4791a32923d7ac393318c653bc2eeb..6273ef15c02410d5b5cd94a2c120e8bf2e2b20aa:/questions/search_indexes.py diff --git a/questions/search_indexes.py b/questions/search_indexes.py index 1e36f41..ff49250 100755 --- a/questions/search_indexes.py +++ b/questions/search_indexes.py @@ -5,9 +5,12 @@ from .models import Question class QuestionIndex(indexes.RealTimeSearchIndex, indexes.Indexable): - text = indexes.CharField(document=True, model_attr="__unicode__") + text = indexes.CharField(document=True) answer = indexes.CharField(model_attr="answer") + def prepare_text(self, obj): + return unicode(obj) + def get_model(self): return Question