I am working on an internal Django project using the Grappelli Admin Theme. I am in Australia and would like to format decimal numbers above 999 as 1,000.00 2,000.00. I have added the following to my settings.py file and the Model field has been defined as a Decimal.
The Change List form displays the number correctly formatted. However, the changeform does not and retains the unlocalized format.
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'Australia/Queensland'
USE_I18N = True
USE_L10N = True
USE_THOUSAND_SEPARATOR = True
NUMBER_GROUPING = 3
I have found numerous similar posts such as Make Django forms use comma as decimal separator
And it does state
localization does need to be turned on explicitly for every field. For a model form (including the ones used in the admin app), a convenient way to do this is to subclass ModelForm and turn on localization for each DecimalField
However, at this stage I just need the Admin Change Form to carry the localisation and I am not sure how to do this when the Grappelli extension is in play. And as I have mentioned the Change List Form does render the same field with the thousand separator as I had hoped.
Your thoughts would be appreciated.