view Preference.py @ 45:0604e374c1d6

pass session when creating a new feed
author Dirk Olmes <dirk@xanthippe.ping.de>
date Fri, 14 May 2010 15:24:51 +0200
parents be990ac6e478
children
line wrap: on
line source


class Preference(object):
    @staticmethod
    def forKey(key, session):
        return session.query(Preference).filter(Preference.key == key).first()
    
    def __init__(self, key, value):
        self.key = key
        self.value = value
    
    def __repr__(self):
        return "<Preference %s = %s>" % (self.key, self.value)