From: Yoan Le Clanche Date: Wed, 14 Oct 2020 15:15:47 +0000 (+0200) Subject: Add search_fields prop to improve search with mezzanine X-Git-Tag: 2.8.1-pro~182 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=62296f40f2d08a24e29cbd4fb604b96238b46a1b;p=teleforma.git Add search_fields prop to improve search with mezzanine --- diff --git a/teleforma/models/core.py b/teleforma/models/core.py index 93006c6e..2be29f75 100755 --- a/teleforma/models/core.py +++ b/teleforma/models/core.py @@ -736,6 +736,7 @@ class Conference(Displayable, WebclassMixin): blank=True) objects = DisplayableManager() + search_fields = {'description': 1, 'sub_title': 2} @property def slug_streaming(self): diff --git a/teleforma/models/pro.py b/teleforma/models/pro.py index a52b11c9..ceb09c44 100644 --- a/teleforma/models/pro.py +++ b/teleforma/models/pro.py @@ -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])