added search on Sujet with django-watson

This commit is contained in:
Arthur Gerbaud
2016-08-26 10:17:59 +02:00
parent 6bdde54ed2
commit dd85cb320a
8 changed files with 48 additions and 64 deletions

View File

@@ -1,5 +1,9 @@
from django.apps import AppConfig
from watson import search as watson
class SujetsConfig(AppConfig):
name = 'sujets'
def ready(self):
Sujet = self.get_model("Sujet")
watson.register(Sujet, fields=('nom', 'prenom', 'surnom'))