aboutsummaryrefslogtreecommitdiff
path: root/src/web/models/article.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-03-01 22:47:53 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-03-01 22:47:53 +0100
commit83081ad7e488c44757e43ff40e83458a2e1451ed (patch)
tree176b04327df88b899aa4172aa30d042a0e43b32a /src/web/models/article.py
parentUseless if no category set. (diff)
downloadnewspipe-83081ad7e488c44757e43ff40e83458a2e1451ed.tar.gz
newspipe-83081ad7e488c44757e43ff40e83458a2e1451ed.tar.bz2
newspipe-83081ad7e488c44757e43ff40e83458a2e1451ed.zip
begin integration of the new architecture
Diffstat (limited to 'src/web/models/article.py')
-rw-r--r--src/web/models/article.py18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/web/models/article.py b/src/web/models/article.py
index 1fee7096..d3c0bed2 100644
--- a/src/web/models/article.py
+++ b/src/web/models/article.py
@@ -29,9 +29,10 @@ __license__ = "GPLv3"
from bootstrap import db
from datetime import datetime
from sqlalchemy import asc, desc
+from web.models.right_mixin import RightMixin
-class Article(db.Model):
+class Article(db.Model, RightMixin):
"Represent an article from a feed."
id = db.Column(db.Integer(), primary_key=True)
entry_id = db.Column(db.String())
@@ -68,18 +69,3 @@ class Article(db.Model):
return "<Article(id=%d, entry_id=%s, title=%r, " \
"date=%r, retrieved_date=%r)>" % (self.id, self.entry_id,
self.title, self.date, self.retrieved_date)
-
- def dump(self):
- return {"id": self.id,
- "user_id": self.user_id,
- "entry_id": self.entry_id,
- "title": self.title,
- "link": self.link,
- "content": self.content,
- "readed": self.readed,
- "like": self.like,
- "date": self.date,
- "updated_date": self.updated_date,
- "retrieved_date": self.retrieved_date,
- "feed_id": self.feed_id,
- "category_id": self.category_id}
bgstack15