python - WTForms decimal separator (for non-English apps) -


for non-english apps it's common use , decimal separator. can't find reference changing decimal formatting based on locale.

is possible wtforms?

the current wtforms code uses python decimal module, totally ignores locale settings separators (in fact, documentation presents an example builds string representation building string representation itself).

you can change line 561 of fields\core.py is

format = '%%0.%df' % self.places

to:

format = '%%0,%df' % self.places

but ugly patch, suggest open issue fix properly


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -