Mercurial > hg > Feedworm
view FeedEntry.py @ 17:5fda8bd94fa8
make the model used to display feeds generic (so it can be used to display FeedEntries, too)
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Wed, 28 Apr 2010 03:37:01 +0200 |
parents | 87317ba41816 |
children | 35225588b895 |
line wrap: on
line source
from datetime import datetime class FeedEntry(object): @staticmethod def findById(id, session): result = session.query(FeedEntry).filter(FeedEntry.id == id) return result.first() def __init__(self): self.create_timestamp = datetime.now() def __repr__(self): return "<FeedEntry (%d) %s>" % (self.pk, self.link)