DecimalField and DECIMAL_SEPARATOR (in admin)
|Reported by:||Owned by:||Raphael Michel|
|Has patch:||yes||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 (19)
comment:3 Changed 3 years ago by
|Component:||Uncategorized → Forms|
|Status:||assigned → new|
|Triage Stage:||Unreviewed → Someday/Maybe|
|Type:||Uncategorized → Bug|