Add fulltext search
This commit is contained in:
parent
aa1b627e6f
commit
36e505952c
7 changed files with 96 additions and 76 deletions
|
@ -24,6 +24,7 @@ from judge.models.submission import Submission
|
|||
from judge.ratings import rate_contest
|
||||
from judge.models.pagevote import PageVotable
|
||||
from judge.models.bookmark import Bookmarkable
|
||||
from judge.fulltext import SearchManager
|
||||
|
||||
__all__ = [
|
||||
"Contest",
|
||||
|
@ -309,6 +310,7 @@ class Contest(models.Model, PageVotable, Bookmarkable):
|
|||
comments = GenericRelation("Comment")
|
||||
pagevote = GenericRelation("PageVote")
|
||||
bookmark = GenericRelation("BookMark")
|
||||
objects = SearchManager(("key", "name"))
|
||||
|
||||
@cached_property
|
||||
def format_class(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue