aboutsummaryrefslogtreecommitdiff
path: root/src/web/models/feed.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-02-03 07:11:37 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-02-03 07:11:37 +0100
commitda929a367c3f1fe5f3546be82e47111c2fa84ad3 (patch)
tree89380f41b802256d8fdbf724e7d9e63b48209b4a /src/web/models/feed.py
parentMerge pull request #30 from jaesivsm/master (diff)
parentwriting a bit of doc, moving crawler together (diff)
downloadnewspipe-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.py8
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}
bgstack15