Protect crashing from malformed data; working on locale-based issues; fast flush; UI focus
svn: r13647
This commit is contained in:
@ -11,6 +11,8 @@ from cli.grampscli import CLIManager
|
||||
from django.template import escape
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
|
||||
import locale
|
||||
|
||||
dji = libdjango.DjangoInterface()
|
||||
|
||||
_dd = DateHandler.displayer.display
|
||||
@ -27,6 +29,11 @@ def probably_alive(handle):
|
||||
db = DjangoDb()
|
||||
return Utils.probably_alive(db.get_person_from_handle(handle), db)
|
||||
|
||||
def format_number(number, with_grouping=True):
|
||||
# FIXME: should be user's setting
|
||||
locale.setlocale(locale.LC_ALL, "en_US.utf8")
|
||||
return locale.format("%d", number, with_grouping)
|
||||
|
||||
class Table(object):
|
||||
"""
|
||||
>>> table = Table()
|
||||
|
Reference in New Issue
Block a user