diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-02-03 07:11:37 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-02-03 07:11:37 +0100 |
commit | da929a367c3f1fe5f3546be82e47111c2fa84ad3 (patch) | |
tree | 89380f41b802256d8fdbf724e7d9e63b48209b4a /src/web/models/feed.py | |
parent | Merge pull request #30 from jaesivsm/master (diff) | |
parent | writing a bit of doc, moving crawler together (diff) | |
download | newspipe-da929a367c3f1fe5f3546be82e47111c2fa84ad3.tar.gz newspipe-da929a367c3f1fe5f3546be82e47111c2fa84ad3.tar.bz2 newspipe-da929a367c3f1fe5f3546be82e47111c2fa84ad3.zip |
Merge pull request #31 from jaesivsm/master
redoing UI
Diffstat (limited to 'src/web/models/feed.py')
-rw-r--r-- | src/web/models/feed.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/web/models/feed.py b/src/web/models/feed.py index 59456a7f..7768ee50 100644 --- a/src/web/models/feed.py +++ b/src/web/models/feed.py @@ -56,9 +56,10 @@ class Feed(db.Model): # relationship icon_url = db.Column(db.String(), db.ForeignKey('icon.url'), default=None) user_id = db.Column(db.Integer(), db.ForeignKey('user.id')) + category_id = db.Column(db.Integer(), db.ForeignKey('category.id')) articles = db.relationship('Article', backref='source', lazy='dynamic', cascade='all,delete-orphan', - order_by=desc("Article.date")) + order_by=desc("date")) def __repr__(self): return '<Feed %r>' % (self.title) @@ -66,12 +67,17 @@ class Feed(db.Model): def dump(self): return {"id": self.id, "user_id": self.user_id, + "category_id": self.category_id, "title": self.title, "description": self.description, "link": self.link, "site_link": self.site_link, "etag": self.etag, + "enabled": self.enabled, + "filters": self.filters, "icon_url": self.icon_url, "error_count": self.error_count, + "last_error": self.last_error, + "created_date": self.created_date, "last_modified": self.last_modified, "last_retrieved": self.last_retrieved} |