diff options
author | François Schmidts <francois.schmidts@gmail.com> | 2015-10-12 21:56:48 +0200 |
---|---|---|
committer | François Schmidts <francois.schmidts@gmail.com> | 2016-01-26 23:46:31 +0100 |
commit | 2ca3246de2b7b54452ba7d996064ae32258f9cd3 (patch) | |
tree | 54c49c2b94827b90b379ae3748561ef39cfb2026 | |
parent | adding, improving UI to manage categories (diff) | |
download | newspipe-2ca3246de2b7b54452ba7d996064ae32258f9cd3.tar.gz newspipe-2ca3246de2b7b54452ba7d996064ae32258f9cd3.tar.bz2 newspipe-2ca3246de2b7b54452ba7d996064ae32258f9cd3.zip |
fixing sqlalchemy resolving warning
-rw-r--r-- | src/web/models/article.py | 4 | ||||
-rw-r--r-- | src/web/models/feed.py | 2 | ||||
-rw-r--r-- | src/web/views/feed.py | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/web/models/article.py b/src/web/models/article.py index 44a4234d..2a5f4329 100644 --- a/src/web/models/article.py +++ b/src/web/models/article.py @@ -54,7 +54,7 @@ class Article(db.Model): """ return Article.query.filter(Article.date < self.date, Article.feed_id == self.feed_id)\ - .order_by(desc("Article.date")).first() + .order_by(desc("date")).first() def next_article(self): """ @@ -62,7 +62,7 @@ class Article(db.Model): """ return Article.query.filter(Article.date > self.date, Article.feed_id == self.feed_id)\ - .order_by(asc("Article.date")).first() + .order_by(asc("date")).first() def __repr__(self): return "<Article(id=%d, entry_id=%s, title=%r, " \ diff --git a/src/web/models/feed.py b/src/web/models/feed.py index 87616e02..9d08a972 100644 --- a/src/web/models/feed.py +++ b/src/web/models/feed.py @@ -59,7 +59,7 @@ class Feed(db.Model): 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) diff --git a/src/web/views/feed.py b/src/web/views/feed.py index e1c2fb55..187fd4c2 100644 --- a/src/web/views/feed.py +++ b/src/web/views/feed.py @@ -49,7 +49,7 @@ def feed(feed_id=None): category = CategoryController(g.user.id).get(id=feed.category_id) articles = ArticleController(g.user.id) \ .read(feed_id=feed_id) \ - .order_by(desc("Article.date")).all() + .order_by(desc("date")).all() top_words = utils.top_words(articles, n=50, size=int(word_size)) tag_cloud = utils.tag_cloud(top_words) |