mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-10 21:00:28 +00:00
forum: implement order by date for search
This commit is contained in:
1 parent
721b22a1e9
commit
6891174935
2 files changed
+10
-3
No files matched your search
@@ -107,6 +107,7 @@ class BigCharFieldIndex(indexes.CharField):
|
||||
class ForumMessageIndex(indexes.SearchIndex, indexes.Indexable):
|
||||
text = BigCharFieldIndex(document=True, use_template=True)
|
||||
auto = indexes.EdgeNgramField(use_template=True)
|
||||
date = indexes.DateTimeField(model_attr="date")
|
||||
|
||||
def get_model(self):
|
||||
return ForumMessage
|
||||
Reference in new issue
Block a user