aboutsummaryrefslogtreecommitdiff
path: root/src/web/models/article.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-05-02 07:31:22 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-05-02 07:31:22 +0200
commit31535e28f8782a13ba9450c9cd95df61a3a26f8e (patch)
treed1fb71f79d257e4fe8853afd13c484f64192bd99 /src/web/models/article.py
parentBugfix: it was not possible to delete a user with categories. (diff)
downloadnewspipe-31535e28f8782a13ba9450c9cd95df61a3a26f8e.tar.gz
newspipe-31535e28f8782a13ba9450c9cd95df61a3a26f8e.tar.bz2
newspipe-31535e28f8782a13ba9450c9cd95df61a3a26f8e.zip
Removed now useless function for Article objects.
Diffstat (limited to 'src/web/models/article.py')
-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