diff options
author | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-01-02 11:14:02 +0100 |
---|---|---|
committer | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-01-02 11:14:02 +0100 |
commit | 6cd6c7a37905398fa0f5c86468b5aeb735c096fc (patch) | |
tree | fdfea101f71640f3a72264894b9b19fccf5c11ae | |
parent | Fix function name in export_epub(). (diff) | |
download | newspipe-6cd6c7a37905398fa0f5c86468b5aeb735c096fc.tar.gz newspipe-6cd6c7a37905398fa0f5c86468b5aeb735c096fc.tar.bz2 newspipe-6cd6c7a37905398fa0f5c86468b5aeb735c096fc.zip |
Numbers are printed with commas as thousands separators.
-rwxr-xr-x | source/pyAggr3g470r.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/pyAggr3g470r.py b/source/pyAggr3g470r.py index 6e320be3..20b0ea20 100755 --- a/source/pyAggr3g470r.py +++ b/source/pyAggr3g470r.py @@ -43,6 +43,9 @@ __license__ = "GPLv3" import os import re import datetime +import locale +locale.setlocale(locale.LC_ALL, 'en_US.utf8') + import cherrypy from mako.template import Template from mako.lookup import TemplateLookup @@ -130,8 +133,8 @@ class pyAggr3g470r(object): feeds = self.mongo.get_all_feeds() 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() + nb_articles = locale.format("%d", self.mongo.nb_articles(), grouping=True) + nb_unread_articles = locale.format("%d", self.mongo.nb_unread_articles(), grouping=True) tmpl = lookup.get_template("management.html") return tmpl.render(feeds=feeds, nb_mail_notifications=nb_mail_notifications, \ nb_favorites=nb_favorites, nb_articles=nb_articles, \ |