Hi,

Actually, I am using these methods to work with money formating.

some tries with python-money and works very well
http://code.google.com/p/python-money/

and sometimes

import locale
locale.setlocale(locale.LC_ALL,('pt_BR','UTF8'))
>>> locale.currency(1090909, grouping=True)
'R$ 1.090.909,00'

So I a thinking about, how to include that as a DAL type? exactly in
the same way web2py threats with Upload fields, we could have a
datatype 'money' working with 'locale'

db.define_table('product',Field('price','money',locale=('pt_BR','UTF8')))
or even declaring locale.setlocale() in the begining of the model file

By now I am doing that with 'represent' or directly in views, but,
Is there any chance to include that in web2py core?








Reply via email to