[Django] #25758: Date filter doesn't use internationalization when USE_L10N is True

25 views
Skip to first unread message

Django

unread,
Nov 15, 2015, 8:10:25 PM11/15/15
to django-...@googlegroups.com
#25758: Date filter doesn't use internationalization when USE_L10N is True
----------------------------+----------------------------------------------
Reporter: AliLozano | Owner: nobody
Type: Bug | Status: new
Component: Template | Version: 1.8
system |
Severity: Normal | Keywords: date,format,internationalization
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+----------------------------------------------
Date filter uses settings.DATE_FORMAT by default to format dates, and
ignore if django is using internationalization and USE_L10N is True

{{ user.date_joined|date }}

Always format with N j, Y

Maybe this is no a problem because date filter uses to use with a arg, but
naturalday filter(of humanize) uses date filter to format dates.

--
Ticket URL: <https://code.djangoproject.com/ticket/25758>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Nov 15, 2015, 8:12:16 PM11/15/15
to django-...@googlegroups.com
#25758: Date filter doesn't use internationalization when USE_L10N is True
-------------------------------------+-------------------------------------

Reporter: AliLozano | Owner: nobody
Type: Bug | Status: new
Component: Template system | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage:
date,format,internationalization | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by AliLozano):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

Solved: https://github.com/django/django/pull/5665

--
Ticket URL: <https://code.djangoproject.com/ticket/25758#comment:1>

Django

unread,
Nov 16, 2015, 9:36:34 AM11/16/15
to django-...@googlegroups.com
#25758: Date filter doesn't use internationalization when USE_L10N is True
-------------------------------------+-------------------------------------

Reporter: AliLozano | Owner: nobody
Type: Bug | Status: new
Component: Template system | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage:
date,format,internationalization | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by timgraham):

Could you please add a test to demonstrate what this fixes?

--
Ticket URL: <https://code.djangoproject.com/ticket/25758#comment:2>

Django

unread,
Nov 17, 2015, 12:46:16 PM11/17/15
to django-...@googlegroups.com
#25758: Date filter doesn't use internationalization when USE_L10N is True
-------------------------------------+-------------------------------------

Reporter: AliLozano | Owner: nobody
Type: Bug | Status: new
Component: Template system | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
date,format,internationalization |
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* has_patch: 0 => 1
* needs_tests: 0 => 1
* stage: Unreviewed => Accepted


Comment:

I'll accept the ticket since no tests fail if that line from the pull
request is removed (same with `if arg is None: arg = settings.TIME_FORMAT`
in the time filter, but we still need a test to show what this fixes.

--
Ticket URL: <https://code.djangoproject.com/ticket/25758#comment:3>

Django

unread,
Jan 30, 2016, 8:52:29 AM1/30/16
to django-...@googlegroups.com
#25758: Date filter doesn't use internationalization when USE_L10N is True
-------------------------------------+-------------------------------------

Reporter: AliLozano | Owner: nobody
Type: Bug | Status: new
Component: Template system | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
date,format,internationalization |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by claudep):

* needs_tests: 1 => 0


Comment:

[https://github.com/django/django/pull/6068 New PR] with tests (and
including the time filter).

--
Ticket URL: <https://code.djangoproject.com/ticket/25758#comment:4>

Django

unread,
Jan 30, 2016, 10:33:17 AM1/30/16
to django-...@googlegroups.com
#25758: Date filter doesn't use internationalization when USE_L10N is True
-------------------------------------+-------------------------------------

Reporter: AliLozano | Owner: nobody
Type: Bug | Status: new
Component: Template system | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
date,format,internationalization | checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/25758#comment:5>

Django

unread,
Jan 30, 2016, 11:06:07 AM1/30/16
to django-...@googlegroups.com
#25758: Date filter doesn't use internationalization when USE_L10N is True
-------------------------------------+-------------------------------------
Reporter: AliLozano | Owner: nobody
Type: Bug | Status: closed

Component: Template system | Version: 1.8
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
date,format,internationalization | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz <claude@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"be9bd3348d3c4b060b6eea53ef23d0651c122c77" be9bd334]:
{{{
#!CommitTicketReference repository=""
revision="be9bd3348d3c4b060b6eea53ef23d0651c122c77"
Fixed #25758 -- Defaulted to current language FORMATs in date/time filters

Thanks Ali Lozano for the report and the initial patch, and Tim Graham for
the review.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25758#comment:6>

Django

unread,
Mar 23, 2017, 12:58:10 PM3/23/17
to django-...@googlegroups.com
#25758: Date filter doesn't use internationalization when USE_L10N is True
-------------------------------------+-------------------------------------
Reporter: Ali Lozano | Owner: nobody

Type: Bug | Status: closed
Component: Template system | Version: 1.8
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
date,format,internationalization | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham):

It looks like this changed a documented behavior, see #27981.

--
Ticket URL: <https://code.djangoproject.com/ticket/25758#comment:7>

Django

unread,
Mar 27, 2017, 12:53:20 PM3/27/17
to django-...@googlegroups.com
#25758: Date filter doesn't use internationalization when USE_L10N is True
-------------------------------------+-------------------------------------
Reporter: Ali Lozano | Owner: nobody
Type: Bug | Status: closed
Component: Template system | Version: 1.8
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
date,format,internationalization | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"6585ebebaaa58aeef45210a3119dbaa322f8baca" 6585ebe]:
{{{
#!CommitTicketReference repository=""
revision="6585ebebaaa58aeef45210a3119dbaa322f8baca"
Fixed #27981 -- Doc'd date/time filter l10n changes in refs #25758.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25758#comment:8>

Django

unread,
Mar 27, 2017, 12:53:35 PM3/27/17
to django-...@googlegroups.com
#25758: Date filter doesn't use internationalization when USE_L10N is True
-------------------------------------+-------------------------------------
Reporter: Ali Lozano | Owner: nobody
Type: Bug | Status: closed
Component: Template system | Version: 1.8
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
date,format,internationalization | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"28cf32b2cb4e6385102be3192aea414be402e1a1" 28cf32b]:
{{{
#!CommitTicketReference repository=""
revision="28cf32b2cb4e6385102be3192aea414be402e1a1"
[1.11.x] Fixed #27981 -- Doc'd date/time filter l10n changes in refs
#25758.

Backport of 6585ebebaaa58aeef45210a3119dbaa322f8baca from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25758#comment:9>

Django

unread,
Mar 27, 2017, 12:53:51 PM3/27/17
to django-...@googlegroups.com
#25758: Date filter doesn't use internationalization when USE_L10N is True
-------------------------------------+-------------------------------------
Reporter: Ali Lozano | Owner: nobody
Type: Bug | Status: closed
Component: Template system | Version: 1.8
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
date,format,internationalization | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"16b97a2cebff2d59d2aadf99b4a240cdc767d646" 16b97a2]:
{{{
#!CommitTicketReference repository=""
revision="16b97a2cebff2d59d2aadf99b4a240cdc767d646"
[1.10.x] Fixed #27981 -- Doc'd date/time filter l10n changes in refs
#25758.

Backport of 6585ebebaaa58aeef45210a3119dbaa322f8baca from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25758#comment:10>

Reply all
Reply to author
Forward
0 new messages