Mercurial > hg > Feedworm
diff 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 |
line wrap: on
line diff
--- a/backend/couchdb/Feed.py Mon Aug 29 03:07:50 2011 +0200 +++ b/backend/couchdb/Feed.py Mon Aug 29 03:08:05 2011 +0200 @@ -15,6 +15,13 @@ def all(database): return Feed.view(database, "feedtest/feeds") + @staticmethod + def create(url, title): + feed = Feed() + feed.rss_url = url + feed.title = title + return feed + def needsUpdate(self): delta = datetime.now() - self.next_update return delta.total_seconds() > self._updateIntervalInSeconds()