Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#13702 closed (fixed)

DATE_FORMAT et al not used when USE_L10N is False

Reported by: Karen Tracey Owned by: Jannis Leidel
Component: Internationalization Version: 1.2
Severity: Keywords:
Cc: Marti Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

If I set USE_L10N to False in settings.py, dates in the admin changelist (at least) do not fall back from using the locale DATE_FORMAT to the settings DATE_FORMAT as is implied by the doc. Rather the no-frills date str/unicode formatting is used. Problem may be that the localize function in utils (http://code.djangoproject.com/browser/django/tags/releases/1.2.1/django/utils/formats.py#L77) does not do anything if USE_L10N is False, or perhaps the caller is supposed to do something else if USE_L10N if False...but the admin, at least, does not: http://code.djangoproject.com/browser/django/tags/releases/1.2.1/django/contrib/admin/util.py#L316. Some code somewhere ought to be falling back to the old settings values, but as far as I can see none is.

Change History (5)

comment:1 Changed 6 years ago by aaloy

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

There is another ticket realted DATE_FORMAT and USE_L10N http://code.djangoproject.com/ticket/13621. In the list Malcom has explained that they made some changes on 1.2.1 to avoid some threading issues with Python date conversion functions,but it seems the chage has other side effects.

comment:2 Changed 6 years ago by Jannis Leidel

Owner: changed from nobody to Jannis Leidel
Status: newassigned
Triage Stage: UnreviewedAccepted

comment:3 Changed 6 years ago by Marti

Cc: Marti added

comment:4 Changed 6 years ago by Jannis Leidel

Resolution: fixed
Status: assignedclosed

(In [13770]) Fixed #13702 -- Made sure to actually fall back to the l10n format strings provided in the settings, when disabled.

comment:5 Changed 6 years ago by Jannis Leidel

(In [13771]) [1.2.X] Fixed #13702 -- Made sure to actually fall back to the l10n format strings provided in the settings, when disabled.

Backport from trunk (r13770).

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