Move to src dir.
[edumed.git] / src / catalogue / search_indexes.py
diff --git a/src/catalogue/search_indexes.py b/src/catalogue/search_indexes.py
new file mode 100755 (executable)
index 0000000..035ce98
--- /dev/null
@@ -0,0 +1,10 @@
+# -*- coding: utf-8 -*-
+from haystack import indexes
+from .models import Lesson
+
+
+class LessonIndex(indexes.SearchIndex, indexes.Indexable):
+    text = indexes.CharField(document=True, use_template=True)
+
+    def get_model(self):
+        return Lesson