comparison backend/couchdb/Feed.py @ 161:2940e74c9663

Creating a feed via the GUI works now.
author dirk
date Mon, 29 Aug 2011 03:08:05 +0200
parents 7d724cf2dcf7
children 04c3b9796b89
comparison
equal deleted inserted replaced
160:86f828096aaf 161:2940e74c9663
13 13
14 @staticmethod 14 @staticmethod
15 def all(database): 15 def all(database):
16 return Feed.view(database, "feedtest/feeds") 16 return Feed.view(database, "feedtest/feeds")
17 17
18 @staticmethod
19 def create(url, title):
20 feed = Feed()
21 feed.rss_url = url
22 feed.title = title
23 return feed
24
18 def needsUpdate(self): 25 def needsUpdate(self):
19 delta = datetime.now() - self.next_update 26 delta = datetime.now() - self.next_update
20 return delta.total_seconds() > self._updateIntervalInSeconds() 27 return delta.total_seconds() > self._updateIntervalInSeconds()
21 28
22 def incrementNextUpdateDate(self): 29 def incrementNextUpdateDate(self):