Since latest commits, DecimalField (and FloatField I guess) have min, max and step properties. Step property use the decimal_place attribute.
However, attribute values are rendered with the template engine. And if settings USE_L10N=True, any values would be localized by default.
As a consequence, with the French language enabled, we would got a HTML tag attribut step=0,01. With Chrome at least, this could be invalid and round the step to integer!
I think that we should do the same thing for any attributes: force them to don't be localized.
However, a special note should be throw to other users implementing their own attrs.html template because they may update it too (if using l10n and applying the default behaviour, which is to localize any values).
Hi,
Since latest commits,
DecimalField
(andFloatField
I guess) havemin
,max
andstep
properties. Step property use thedecimal_place
attribute.However, attribute values are rendered with the template engine. And if settings
USE_L10N=True
, any values would be localized by default. As a consequence, with the French language enabled, we would got a HTML tag attributstep=0,01
. With Chrome at least, this could be invalid and round the step to integer!I think that we should do the same thing for any attributes: force them to don't be localized.
However, a special note should be throw to other users implementing their own
attrs.html
template because they may update it too (if using l10n and applying the default behaviour, which is to localize any values).Thanks