Mercurial > hg > Feedworm
comparison 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 |
comparison
equal
deleted
inserted
replaced
180:a4832a180c69 | 181:1ab48428e2f9 |
---|---|
24 | 24 |
25 @staticmethod | 25 @staticmethod |
26 def getReadFeedEntriesOlderThan(timestamp, database): | 26 def getReadFeedEntriesOlderThan(timestamp, database): |
27 end = [timestamp.year, timestamp.month, timestamp.day, timestamp.hour, timestamp.minute, | 27 end = [timestamp.year, timestamp.month, timestamp.day, timestamp.hour, timestamp.minute, |
28 timestamp.second] | 28 timestamp.second] |
29 # end = str(end).replace(" ", "") | |
30 return FeedEntry.view(database, CouchDb.readFeedEntriesByCreateDate(), endkey=end) | 29 return FeedEntry.view(database, CouchDb.readFeedEntriesByCreateDate(), endkey=end) |
30 | |
31 @staticmethod | |
32 def compareByUpdateDate(first, second): | |
33 return cmp(first, second) | |
31 | 34 |
32 def markRead(self, database): | 35 def markRead(self, database): |
33 self.read = True | 36 self.read = True |
34 self.store(database) | 37 self.store(database) |
35 | 38 |