From cbe51f5f50bceff02f48dfbdd3c09e1660063c4a Mon Sep 17 00:00:00 2001 From: François Schmidts Date: Tue, 21 Jul 2015 10:51:45 +0200 Subject: retrieved date is now when retrieved and comparison are made on the date of articles --- pyaggr3g470r/models/article.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'pyaggr3g470r/models') diff --git a/pyaggr3g470r/models/article.py b/pyaggr3g470r/models/article.py index 16f15b9e..c98164d0 100644 --- a/pyaggr3g470r/models/article.py +++ b/pyaggr3g470r/models/article.py @@ -26,7 +26,6 @@ __revision__ = "$Date: 2014/04/12 $" __copyright__ = "Copyright (c) Cedric Bonhomme" __license__ = "GPLv3" -import json from bootstrap import db from datetime import datetime from sqlalchemy import asc, desc @@ -66,10 +65,9 @@ class Article(db.Model): .order_by(asc("Article.date")).first() def __repr__(self): - return json.dumps({"title": self.title, - "link": self.link, - "content": self.content - }) + return "" % (self.id, self.entry_id, + self.title, self.date, self.retrieved_date) def dump(self): return {"id": self.id, -- cgit