DecimalField and DECIMAL_SEPARATOR (in admin)
|Reported by:||matija@…||Owned by:|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
DecimalField with following settings:
LANGUAGE_CODE = 'hr-hr'
TIME_ZONE = 'CET'
USE_I18N = True
USE_L10N = False
USE_TZ = False
DATE_FORMAT = 'd.m.Y.'
DATE_INPUT_FORMATS = ('%d.%m.%Y.', '%d.%m.%Y', '%Y-%m-%d')
DECIMAL_SEPARATOR = ','
Correctly shows Decimal field in admin, but raises validation error.
As most of our customers do not set their preferences to Croatian, and we need to show Croatian locale for all users. So with settings above, things sdhould work.
Tried in 1.6 and 1.7.
In order to reproduce, all you need is a single model with a DecimalField, registered in Admin. And the above settings. Input any non-integer value and press save_and_continue_editing. If you encounter no errors, press it again. Now it will show an error.
I added a new ticked because related ones were closed years ago.
Change History (11)
comment:1 Changed 15 months ago by sabinemaennel
- Needs documentation unset
- Needs tests unset
- Owner changed from nobody to sabinemaennel
- Patch needs improvement unset
- Status changed from new to assigned
comment:3 Changed 15 months ago by sabinemaennel
- Component changed from Uncategorized to Forms
- Owner sabinemaennel deleted
- Status changed from assigned to new
- Triage Stage changed from Unreviewed to Someday/Maybe
- Type changed from Uncategorized to Bug