DecimalField is not aware of locale (in admin)
|Reported by:||Florian Sening||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
We are using a German locale right now and noticed in the admin that DateField is locale-aware while the DecimalField is not. DateField displays the date using 'd.m.Y' while also accepting an input that way. For the DecimalField DECIMAL_SEPARATOR and THOUSAND_SEPARATOR need to be switched for display and input.
While looking at the code I noticed that there is indeed some code for a locale-aware display and input for DecimalField. There also is a variable localize that's always False. Is there a reason why this is disabled by default? How do I enable it?
Since parts of the admin are accessed by normal users and the only language is German so far, there has to be a way to change this for the admin.
Change History (4)
comment:1 Changed 6 years ago by
|Component:||Uncategorized → Forms|
|Status:||new → closed|
|Type:||Uncategorized → Bug|