Kaynağa Gözat

sort by date

David 10 yıl önce
ebeveyn
işleme
472e669588
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      db.py

+ 2 - 2
db.py

@@ -40,8 +40,8 @@ class db():
         if "keyword" in filter and len(filter["keyword"]) >0:
             db_filter["kw"]={"$all": filter["keyword"]}
 
-        print(db_filter)
-        q = self.c_articles.find(db_filter,{"html":0,"text":0}).limit(limit)
+        #print(db_filter)
+        q = self.c_articles.find(db_filter,{"html":0,"text":0}).limit(limit).sort("scrap_date")
         count = q.count()
         return { 'articles': [ self.jsonable(p) for p in q ],
                  'count' : count }