aboutsummaryrefslogtreecommitdiff
path: root/src/web/models
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/models')
-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