From c6bc9e5c6f98fa6275a205e68533e07bafd5bdd1 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Mon, 7 Jan 2013 10:19:48 +0100 Subject: Minor bugfix: the number of favorites articles wasn't passed to the /feed page. --- source/pyAggr3g470r.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/pyAggr3g470r.py b/source/pyAggr3g470r.py index 76507afe..b54e8a48 100755 --- a/source/pyAggr3g470r.py +++ b/source/pyAggr3g470r.py @@ -263,6 +263,7 @@ class pyAggr3g470r(object): nb_articles_total = self.mongo.nb_articles() nb_unread_articles_feed = self.mongo.nb_unread_articles(feed_id) favorites = self.mongo.get_favorites(feed_id) + nb_favorites = self.mongo.nb_favorites(feed_id) except KeyError: return self.error("

This feed do not exists.

") @@ -280,7 +281,7 @@ class pyAggr3g470r(object): tmpl = lookup.get_template("feed.html") return tmpl.render(feed=feed, articles=articles, favorites=favorites, \ nb_articles_feed=nb_articles_feed, nb_articles_total=nb_articles_total, nb_unread_articles_feed=nb_unread_articles_feed, \ - first_post_date=first_article, end_post_date=last_article, \ + nb_favorites = nb_favorites, first_post_date=first_article, end_post_date=last_article, \ average=average, delta=delta, elapsed=elapsed, \ tag_cloud=tag_cloud, word_size=word_size, mail_to=conf.mail_to) @@ -598,4 +599,4 @@ if __name__ == '__main__': root = pyAggr3g470r() root.favicon_ico = cherrypy.tools.staticfile.handler(filename=os.path.join(conf.path + "/img/favicon.png")) cherrypy.config.update({'error_page.404': error_404}) - cherrypy.quickstart(root, "/" ,config=conf.path + "/cfg/cherrypy.cfg") \ No newline at end of file + cherrypy.quickstart(root, "/" ,config=conf.path + "/cfg/cherrypy.cfg") -- cgit