view Feed.py @ 21:c8bb3cee7935

pull out DisplayModel into its own file, add the scaffolding for the add feed menu entry
author Dirk Olmes <dirk@xanthippe.ping.de>
date Thu, 29 Apr 2010 05:03:38 +0200
parents 5fda8bd94fa8
children 5bb57caa8f66
line wrap: on
line source


class Feed(object):
    @staticmethod
    def all(session):
        return session.query(Feed).order_by(Feed.title).all()
    
    def __init__(self, title, rss_url):
        self.title = title
        self.rss_url = rss_url

    def __repr__(self):
        return "<Feed (%d) %s>" % (self.pk, self.title)

    def userPresentableString(self):
        return self.title