diff options
author | François Schmidts <francois.schmidts@gmail.com> | 2015-09-11 18:28:12 +0200 |
---|---|---|
committer | François Schmidts <francois.schmidts@gmail.com> | 2016-01-26 23:46:30 +0100 |
commit | 462f6d3b21558ed0a283c24e0e0332eac6ccbbb3 (patch) | |
tree | 451c583b5f47bbf6e38743881c66f2f27371bd82 /src/web/models/article.py | |
parent | moving the root of source code from / to /src/ (diff) | |
download | newspipe-462f6d3b21558ed0a283c24e0e0332eac6ccbbb3.tar.gz newspipe-462f6d3b21558ed0a283c24e0e0332eac6ccbbb3.tar.bz2 newspipe-462f6d3b21558ed0a283c24e0e0332eac6ccbbb3.zip |
base modification in model for category support
Diffstat (limited to 'src/web/models/article.py')
-rw-r--r-- | src/web/models/article.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/web/models/article.py b/src/web/models/article.py index 54eefe75..44a4234d 100644 --- a/src/web/models/article.py +++ b/src/web/models/article.py @@ -32,10 +32,8 @@ from sqlalchemy import asc, desc class Article(db.Model): - """ - Represent an article from a feed. - """ - id = db.Column(db.Integer, primary_key=True) + "Represent an article from a feed." + id = db.Column(db.Integer(), primary_key=True) entry_id = db.Column(db.String()) link = db.Column(db.String()) title = db.Column(db.String()) @@ -46,8 +44,9 @@ class Article(db.Model): date = db.Column(db.DateTime(), default=datetime.now) retrieved_date = db.Column(db.DateTime(), default=datetime.now) - user_id = db.Column(db.Integer, db.ForeignKey('user.id')) - feed_id = db.Column(db.Integer, db.ForeignKey('feed.id')) + user_id = db.Column(db.Integer(), db.ForeignKey('user.id')) + feed_id = db.Column(db.Integer(), db.ForeignKey('feed.id')) + category_id = db.Column(db.Integer(), db.ForeignKey('category.id')) def previous_article(self): """ |