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
Post a Comment