diff backend/couchdb/FeedEntry.py @ 181:1ab48428e2f9

sort the feed entries
author dirk
date Sat, 10 Sep 2011 09:05:14 +0200
parents d0ced79b5030
children ac1de0a467fd
line wrap: on
line diff
--- a/backend/couchdb/FeedEntry.py	Sat Sep 10 04:43:40 2011 +0200
+++ b/backend/couchdb/FeedEntry.py	Sat Sep 10 09:05:14 2011 +0200
@@ -26,9 +26,12 @@
     def getReadFeedEntriesOlderThan(timestamp, database):
         end = [timestamp.year, timestamp.month, timestamp.day, timestamp.hour, timestamp.minute,
                timestamp.second]
-#        end = str(end).replace(" ", "")
         return FeedEntry.view(database, CouchDb.readFeedEntriesByCreateDate(), endkey=end)
 
+    @staticmethod
+    def compareByUpdateDate(first, second):
+        return cmp(first, second)
+
     def markRead(self, database):
         self.read = True
         self.store(database)