No grupo web2py-users em inglês teve uma questão parecida:
And as a decimal sign, we use ',' not '.'. Again, how to change it in
the forms?
O Massimo deu esta resposta:
Evil! You must edit the web2py_ajax and comment ajax validation of______
float. Then create a validator likedef LOCALIZE_FLOAT:
def __init__(self,separator): self.s=str(separator)
def __call__(self,value): return (value.replace(self.s,'.'),None)
def formatter(self,value): return str(value).replace('.',self.s)
db.table.field.requires=[LOCALIZE_FLOAT(T('.')),IS_FLOAT_IN_RANGE
then translate the '.' into '.' using the translation interface. If
(0,100)]
you only deal with european floats, just put self.s=','.