comparison FeedEntry.py @ 4:e0199f383442

retrieve a feed for the given URL, store entries as feed_entry rows into the database
author Dirk Olmes <dirk@xanthippe.ping.de>
date Mon, 26 Apr 2010 19:33:07 +0200
parents
children bfd47f55d85b
comparison
equal deleted inserted replaced
3:2ac144a98370 4:e0199f383442
1
2 class FeedEntry(object):
3 @staticmethod
4 def findById(id, session):
5 result = session.query(FeedEntry).filter(FeedEntry.id == id)
6 return result.first()
7
8 def __init__(self, id, url, title, summary):
9 self.id = id
10 self.url = url
11 self.title = title
12 self.summary = summary
13
14 def __repr__(self):
15 return "<FeedEntry (%d) %s>" % (self.pk, self.link)