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

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -