aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/models
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel+bitbucket@gmail.com>2015-07-21 17:50:34 +0200
committerCédric Bonhomme <kimble.mandel+bitbucket@gmail.com>2015-07-21 17:50:34 +0200
commitd5200b2c9879938fe8e66c0016023d62a9b4f291 (patch)
treebd474e414f10c01c3779ee27a4dd3bc5f81e59be /pyaggr3g470r/models
parentUpdated translations. (diff)
parentimproving article listing : default icon and title for article link (diff)
downloadnewspipe-d5200b2c9879938fe8e66c0016023d62a9b4f291.tar.gz
newspipe-d5200b2c9879938fe8e66c0016023d62a9b4f291.tar.bz2
newspipe-d5200b2c9879938fe8e66c0016023d62a9b4f291.zip
Merged in jaesivsm/pyaggr3g470r (pull request #19)
small post vacations fix
Diffstat (limited to 'pyaggr3g470r/models')
-rw-r--r--pyaggr3g470r/models/article.py8
1 files changed, 3 insertions, 5 deletions
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 "<Article(id=%d, entry_id=%s, title=%r, " \
+ "date=%r, retrieved_date=%r)>" % (self.id, self.entry_id,
+ self.title, self.date, self.retrieved_date)
def dump(self):
return {"id": self.id,
bgstack15