diff options
author | cedricbonhomme <devnull@localhost> | 2012-03-10 08:38:04 +0100 |
---|---|---|
committer | cedricbonhomme <devnull@localhost> | 2012-03-10 08:38:04 +0100 |
commit | 1ba0bcfb0bb085c13e5b2ac791aed56a713249a3 (patch) | |
tree | 5e297a604f203145623bc0baa88b71b90601036f /pyAggr3g470r.py | |
parent | Removed create_base() for SQLite. (diff) | |
download | newspipe-1ba0bcfb0bb085c13e5b2ac791aed56a713249a3.tar.gz newspipe-1ba0bcfb0bb085c13e5b2ac791aed56a713249a3.tar.bz2 newspipe-1ba0bcfb0bb085c13e5b2ac791aed56a713249a3.zip |
Better code of the management page.
Diffstat (limited to 'pyAggr3g470r.py')
-rwxr-xr-x | pyAggr3g470r.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py index ae7af2d4..e9edd6f0 100755 --- a/pyAggr3g470r.py +++ b/pyAggr3g470r.py @@ -245,7 +245,11 @@ class Root: and display some statistics. """ feeds = self.mongo.get_all_collections() - + nb_mail_notifications = self.mongo.nb_mail_notifications() + nb_favorites = self.mongo.nb_favorites() + nb_articles = self.mongo.nb_articles() + nb_unread_articles = self.mongo.nb_unread_articles() + html = htmlheader() html += htmlnav html += """<div class="left inner">\n""" @@ -262,16 +266,16 @@ class Root: html += """</select><input type="submit" value="OK"></form>\n""" html += """<p>Active e-mail notifications: <a href="/notifications/">%s</a></p>\n""" % \ - (self.mongo.nb_mail_notifications(),) + (nb_mail_notifications,) html += """<p>You like <a href="/favorites/">%s</a> article(s).</p>\n""" % \ - (self.mongo.nb_favorites(), ) + (nb_favorites, ) html += "<hr />\n" # Informations about the data base of articles html += """<p>%s article(s) are loaded from the database with <a href="/unread/">%s unread article(s)</a>.<br />\n""" % \ - (self.mongo.nb_articles(), self.mongo.nb_unread_articles()) + (nb_articles, nb_unread_articles) #html += """Database: %s.\n<br />Size: %s bytes.<br />\n""" % \ #(os.path.abspath(utils.sqlite_base), os.path.getsize(utils.sqlite_base)) html += '<a href="/statistics/">Advanced statistics.</a></p>\n' |