aboutsummaryrefslogtreecommitdiff
path: root/src/web/controllers/article.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-04-06 23:45:06 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-04-06 23:45:06 +0200
commit0e42e6d8ce1a056b4426148651b741f345968be2 (patch)
tree982b511677d05142726d92410e0d67ec1d25574b /src/web/controllers/article.py
parentreplace g.user by current_user (diff)
downloadnewspipe-0e42e6d8ce1a056b4426148651b741f345968be2.tar.gz
newspipe-0e42e6d8ce1a056b4426148651b741f345968be2.tar.bz2
newspipe-0e42e6d8ce1a056b4426148651b741f345968be2.zip
major problems fixed.
Diffstat (limited to 'src/web/controllers/article.py')
-rw-r--r--src/web/controllers/article.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/web/controllers/article.py b/src/web/controllers/article.py
index 8c6952cb..37a35023 100644
--- a/src/web/controllers/article.py
+++ b/src/web/controllers/article.py
@@ -96,3 +96,8 @@ class ArticleController(AbstractController):
else:
articles_counter[article.date.year] += 1
return articles_counter, articles
+
+ def read_light(self, **filters):
+ return super().read(**filters).with_entities(Article.id, Article.title,
+ Article.readed, Article.like, Article.feed_id, Article.date,
+ Article.category_id).order_by(Article.date.desc())
bgstack15