Mercurial > hg > Feedworm
view FeedEntry.py @ 32:500ba01e7f7a
TODO items
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Fri, 30 Apr 2010 06:02:06 +0200 |
parents | 5bb57caa8f66 |
children | f371d02fa09d |
line wrap: on
line source
from datetime import datetime def compareByUpdateDate(first, second): return cmp(first.updated, second.updated) 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() self.read = 0 def __repr__(self): return "<FeedEntry (%d) %s>" % (self.pk, self.title) def userPresentableString(self): return self.title