aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-05-29 23:01:46 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-05-29 23:01:46 +0200
commit89a18bd74085b0720fa10687e2d5a9d8d73837af (patch)
tree1448a4b376fac4cb359c0f3a70f9658d4313b0fa
parentFixed some depreciations with the new version of Flask. (diff)
parentRemoved now useless function for Article objects. (diff)
downloadnewspipe-89a18bd74085b0720fa10687e2d5a9d8d73837af.tar.gz
newspipe-89a18bd74085b0720fa10687e2d5a9d8d73837af.tar.bz2
newspipe-89a18bd74085b0720fa10687e2d5a9d8d73837af.zip
Merge branch 'master' of github.com:JARR/JARR
-rw-r--r--src/web/models/article.py20
1 files changed, 2 insertions, 18 deletions
diff --git a/src/web/models/article.py b/src/web/models/article.py
index 0a2a082e..880cd561 100644
--- a/src/web/models/article.py
+++ b/src/web/models/article.py
@@ -1,7 +1,7 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-
-# jarr - A Web based news aggregator.
+# JARR - A Web based news aggregator.
# Copyright (C) 2010-2016 Cédric Bonhomme - https://www.cedricbonhomme.org
#
# For more information : https://github.com/JARR/JARR
@@ -22,7 +22,7 @@
__author__ = "Cedric Bonhomme"
__version__ = "$Revision: 0.4 $"
__date__ = "$Date: 2013/11/05 $"
-__revision__ = "$Date: 2014/04/12 $"
+__revision__ = "$Date: 2016/05/02 $"
__copyright__ = "Copyright (c) Cedric Bonhomme"
__license__ = "GPLv3"
@@ -59,22 +59,6 @@ class Article(db.Model, RightMixin):
return {'id', 'entry_id', 'link', 'title', 'content', 'date',
'retrieved_date', 'user_id'}
- def previous_article(self):
- """
- Returns the previous article (older).
- """
- return Article.query.filter(Article.date < self.date,
- Article.feed_id == self.feed_id)\
- .order_by(desc("date")).first()
-
- def next_article(self):
- """
- Returns the next article (newer).
- """
- return Article.query.filter(Article.date > self.date,
- Article.feed_id == self.feed_id)\
- .order_by(asc("date")).first()
-
def __repr__(self):
return "<Article(id=%d, entry_id=%s, title=%r, " \
"date=%r, retrieved_date=%r)>" % (self.id, self.entry_id,
bgstack15