#35142: DATE and DATETIME settings have no effect since USE_L10N was deprecated
-------------------------------------+-------------------------------------
Reporter: Paul | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: | Version: 5.0
Internationalization |
Severity: Normal | Resolution: needsinfo
Keywords: USE_L10N, | Triage Stage:
localization | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by Paul:
Old 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.
New 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.
DEMO PROJECT: https://github.com/paulik123/django-demo-l10n
--
--
Ticket URL: <https://code.djangoproject.com/ticket/35142#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018d40a40d01-576d567e-bead-478a-9703-cd77fc03bbfc-000000%40eu-central-1.amazonses.com.