diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-03-01 22:47:53 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-03-01 22:47:53 +0100 |
commit | 83081ad7e488c44757e43ff40e83458a2e1451ed (patch) | |
tree | 176b04327df88b899aa4172aa30d042a0e43b32a /src/web/models/feed.py | |
parent | Useless if no category set. (diff) | |
download | newspipe-83081ad7e488c44757e43ff40e83458a2e1451ed.tar.gz newspipe-83081ad7e488c44757e43ff40e83458a2e1451ed.tar.bz2 newspipe-83081ad7e488c44757e43ff40e83458a2e1451ed.zip |
begin integration of the new architecture
Diffstat (limited to 'src/web/models/feed.py')
-rw-r--r-- | src/web/models/feed.py | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/src/web/models/feed.py b/src/web/models/feed.py index cb78f7ad..ba9255e9 100644 --- a/src/web/models/feed.py +++ b/src/web/models/feed.py @@ -29,9 +29,10 @@ __license__ = "GPLv3" from bootstrap import db from datetime import datetime from sqlalchemy import desc +from web.models.right_mixin import RightMixin -class Feed(db.Model): +class Feed(db.Model, RightMixin): """ Represent a feed. """ @@ -63,22 +64,3 @@ class Feed(db.Model): def __repr__(self): return '<Feed %r>' % (self.title) - - 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, - "nb_articles": self.articles.count()} |