Re: [Django] #35333: Template tag `unlocalize` does not work with `date` and `time` filters.

35 views
Skip to first unread message

Django

unread,
Apr 13, 2024, 1:22:46 PM4/13/24
to django-...@googlegroups.com
#35333: Template tag `unlocalize` does not work with `date` and `time` filters.
---------------------------------+----------------------------------------
Reporter: Natalia Bidart | Owner: Claude Paroz
Type: Bug | Status: assigned
Component: Template system | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+----------------------------------------
Comment (by Claude Paroz):

I'm not yet sure if this can be resolved in the code, or if we should
rather complement the template filter docs, telling that if you apply an
l10n-sensible filter inside an unlocalized section, you should specify an
explicit format argument. The problem being that the way filters are
currently implemented, it's not possible to transmit any context. That
explains for example that `floatformat` gained an `u` parameter to force
unlocalization (see #30086).

So in your example in the tests above, you should use
`|date:settings.DATE_FORMAT` and not just `DATE_FORMAT`. Thoughts?
--
Ticket URL: <https://code.djangoproject.com/ticket/35333#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 20, 2024, 4:33:53 AM5/20/24
to django-...@googlegroups.com
#35333: Template tag `unlocalize` does not work with `date` and `time` filters.
---------------------------------+------------------------------------
Reporter: Natalia Bidart | Owner: (none)
Type: Bug | Status: new
Component: Template system | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Claude Paroz):

* owner: Claude Paroz => (none)
* status: assigned => new

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

Django

unread,
Mar 14, 2025, 10:43:25 AM3/14/25
to django-...@googlegroups.com
#35333: Template tag `unlocalize` does not work with `date` and `time` filters.
---------------------------------+----------------------------------------
Reporter: Natalia Bidart | Owner: Ahmed Nassar
Type: Bug | Status: assigned
Component: Template system | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+----------------------------------------
Changes (by Ahmed Nassar):

* owner: (none) => Ahmed Nassar
* status: new => assigned

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

Django

unread,
Mar 15, 2025, 11:39:23 AM3/15/25
to django-...@googlegroups.com
#35333: Template tag `unlocalize` does not work with `date` and `time` filters.
---------------------------------+----------------------------------------
Reporter: Natalia Bidart | Owner: Ahmed Nassar
Type: Bug | Status: assigned
Component: Template system | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+----------------------------------------
Comment (by Ahmed Nassar):

I'd like to work on this issue if it's still available. Could you confirm
if it's unassigned? If so, I will start by reviewing the expected behavior
and checking the existing implementation of date and time filters.

Looking forward to contributing!
--
Ticket URL: <https://code.djangoproject.com/ticket/35333#comment:4>

Django

unread,
Apr 20, 2025, 5:08:45 AM4/20/25
to django-...@googlegroups.com
#35333: Template tag `unlocalize` does not work with `date` and `time` filters.
---------------------------------+----------------------------------------
Reporter: Natalia Bidart | Owner: Ahmed Nassar
Type: Bug | Status: assigned
Component: Template system | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+----------------------------------------
Changes (by Ahmed Nassar):

* has_patch: 0 => 1

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

Django

unread,
May 20, 2025, 4:04:41 AM5/20/25
to django-...@googlegroups.com
#35333: Template tag `unlocalize` does not work with `date` and `time` filters.
---------------------------------+----------------------------------------
Reporter: Natalia Bidart | Owner: Ahmed Nassar
Type: Bug | Status: assigned
Component: Template system | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
---------------------------------+----------------------------------------
Changes (by Sarah Boyce):

* needs_better_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/35333#comment:6>
Reply all
Reply to author
Forward
0 new messages