Opened 8 months ago

Last modified 6 months ago

#35142 closed Cleanup/optimization

DATE and DATETIME settings have no effect since USE_L10N was deprecated — at Initial Version

Reported by: Paul Owned by: nobody
Component: Internationalization Version: 5.0
Severity: Normal Keywords: USE_L10N, localization
Cc: Claude Paroz Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Since 5.0 USE_L10N settings was DEPRECATED and is always True.

Now settings like DATE_FORMAT, DATETIME_FORMAT, DATE_FORMAT_INPUTS etc.. don't work because as per documentation:
"Note that the locale-dictated format has higher precedence and will be applied instead. But now locale-dictated formats are always enabled."
Now locale-dictated formats will always have higher precedence.

It alse breaks editing on all ModelForms which have date and datetime fields because the input is expecting ISO format, but Django forcefully localizes the value attribute to another format.

I've found a solution but overriding the formats.py file using the FORMAT_MODULE_PATH setting. I think at least the documents should make it clear you can do that.

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top