aboutsummaryrefslogtreecommitdiff
path: root/src/web
diff options
context:
space:
mode:
Diffstat (limited to 'src/web')
-rw-r--r--src/web/models/article.py4
-rw-r--r--src/web/models/feed.py2
-rw-r--r--src/web/views/feed.py2
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)
bgstack15