DecimalField is not aware of locale (in admin)
|Reported by:||Semmel||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 4 years ago by carljm
- Component changed from Uncategorized to Forms
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Resolution set to invalid
- Status changed from new to closed
- Type changed from Uncategorized to Bug
comment:3 Changed 4 years ago by Semmel
- Resolution invalid deleted
- Status changed from closed to reopened