DateTimeFormat in admin doesn't use DATETIME_FORMAT from settings
|Reported by:||powerfox||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I have set DATETIME_FORMAT in the settings. I have 2 models with OneToMany relation (one has datetime and another uses fk to get datetime). In admin I get correct datetime for model, which uses function returning fk.some_datetime. Format in model containing datetime is wrong.
After checking I noticed it comes from utils.translation.get_date_formats:
datetime_format = ugettext('DATETIME_FORMAT') ... if datetime_format == 'DATETIME_FORMAT': datetime_format = settings.DATETIME_FORMAT #is never set for me
I have default localization: "LANGUAGE_CODE = 'en-us'" in settings.
Change History (4)
comment:1 Changed 5 years ago by powerfox
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:3 Changed 5 years ago by powerfox
- Component changed from django.contrib.admin to Translations