From 62296f40f2d08a24e29cbd4fb604b96238b46a1b Mon Sep 17 00:00:00 2001 From: Yoan Le Clanche Date: Wed, 14 Oct 2020 17:15:47 +0200 Subject: [PATCH] Add search_fields prop to improve search with mezzanine --- teleforma/models/core.py | 1 + teleforma/models/pro.py | 2 ++ 2 files changed, 3 insertions(+) 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]) -- 2.39.5