]> git.parisson.com Git - teleforma.git/commitdiff
Add search_fields prop to improve search with mezzanine
authorYoan Le Clanche <yoanl@pilotsystems.net>
Wed, 14 Oct 2020 15:15:47 +0000 (17:15 +0200)
committerYoan Le Clanche <yoanl@pilotsystems.net>
Wed, 14 Oct 2020 15:15:47 +0000 (17:15 +0200)
teleforma/models/core.py
teleforma/models/pro.py

index 93006c6ee45b8804e9b88e96248e02a5986a2cc7..2be29f75669b18ac44629b3b22a833fd106bebc3 100755 (executable)
@@ -736,6 +736,7 @@ class Conference(Displayable, WebclassMixin):
                                      blank=True)
 
     objects = DisplayableManager()
+    search_fields = {'description': 1, 'sub_title': 2}
 
     @property
     def slug_streaming(self):
index a52b11c9d4934aef0b9f6c6634885f0630a3e5b3..ceb09c44179ee3fc12603424ced84d52150f59db 100644 (file)
@@ -133,6 +133,8 @@ class Seminar(ClonableMixin, Displayable):
 
     objects = DisplayableManager()
 
+    search_fields = {'description': 1, 'sub_title':2, 'index':1}
+
     def __unicode__(self):
         if self.publish_date:
             return ' - '.join([str(self.publish_date.year), self.course.title, str(self.rank), self.title])