Opened 14 years ago

Closed 14 years ago

Last modified 14 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 Raudsepp Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

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 by aaloy, 14 years ago

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 by Jannis Leidel, 14 years ago

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

comment:3 by Marti Raudsepp, 14 years ago

Cc: Marti Raudsepp added

comment:4 by Jannis Leidel, 14 years ago

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 by Jannis Leidel, 14 years ago

(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