Re: [Django] #36758: Template parser errors when using whitespace around pipe for certain filters

9 views
Skip to first unread message

Django

unread,
Nov 30, 2025, 4:11:46 AM (3 days ago) Nov 30
to django-...@googlegroups.com
#36758: Template parser errors when using whitespace around pipe for certain
filters
-------------------------------------+-------------------------------------
Reporter: Stephen Skett | Owner: (none)
Type: Uncategorized | Status: new
Component: Template system | Version: 4.2
Severity: Normal | Resolution:
Keywords: template, filter, | Triage Stage:
pipe, whitespace, divisibleby, | Unreviewed
center |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Ahmed Asar):

Hi Stephen,

Thanks for the detailed report. I was able to reproduce the issue with
divisibleby and center when whitespace is added around the | — while other
filters (like date) handle it fine. This does look like an inconsistency
in the template parser.

Before proceeding, could you confirm which Django version you're using
(exact version, e.g. 4.2.11 or main branch)? Also, would you be open to me
investigating this further and potentially submitting a fix?

I’m happy to help, but I don’t want to step on your toes if you’d like
to work on it yourself.

Best regards!
--
Ticket URL: <https://code.djangoproject.com/ticket/36758#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Dec 1, 2025, 6:00:16 AM (2 days ago) Dec 1
to django-...@googlegroups.com
#36758: Template parser errors when using whitespace around pipe for certain
filters
-------------------------------------+-------------------------------------
Reporter: Stephen Skett | Owner: (none)
Type: Uncategorized | Status: new
Component: Template system | Version: 4.2
Severity: Normal | Resolution:
Keywords: template, filter, | Triage Stage:
pipe, whitespace, divisibleby, | Unreviewed
center |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Stephen Skett):

Hi Ahmed, thanks so much for your swift response!
Yes, please feel free to look into this issue if/when you can -- I doubt I
will find time to work on it in any kind of detail any time soon.
In answer to your question RE: specific Django version, I am using v4.2.4
for the project in question where I noticed this bug. I hope that helps.
Many thanks in advance,
Stephen
--
Ticket URL: <https://code.djangoproject.com/ticket/36758#comment:3>

Django

unread,
Dec 1, 2025, 8:46:50 AM (2 days ago) Dec 1
to django-...@googlegroups.com
#36758: Template parser errors when using whitespace around pipe for certain
filters
-------------------------------------+-------------------------------------
Reporter: Stephen Skett | Owner: (none)
Type: Uncategorized | Status: new
Component: Template system | Version: 4.2
Severity: Normal | Resolution:
Keywords: template, filter, | Triage Stage:
pipe, whitespace, divisibleby, | Unreviewed
center |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Ahmed Asar):

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

Django

unread,
Dec 1, 2025, 8:51:28 AM (2 days ago) Dec 1
to django-...@googlegroups.com
#36758: Template parser errors when using whitespace around pipe for certain
filters
-------------------------------------+-------------------------------------
Reporter: Stephen Skett | Owner: Ahmed
| Asar
Type: Uncategorized | Status: assigned
Component: Template system | Version: 4.2
Severity: Normal | Resolution:
Keywords: template, filter, | Triage Stage:
pipe, whitespace, divisibleby, | Unreviewed
center |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Ahmed Asar):

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

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

Django

unread,
Dec 1, 2025, 9:08:37 AM (2 days ago) Dec 1
to django-...@googlegroups.com
#36758: Template parser errors when using whitespace around pipe for certain
filters
-------------------------------------+-------------------------------------
Reporter: Stephen Skett | Owner: Ahmed
| Asar
Type: Uncategorized | Status: assigned
Component: Template system | Version: 4.2
Severity: Normal | Resolution:
Keywords: template, filter, | Triage Stage:
pipe, whitespace, divisibleby, | Unreviewed
center |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Ahmed Asar):

In which file is the problem located? I mean, which path?
--
Ticket URL: <https://code.djangoproject.com/ticket/36758#comment:6>

Django

unread,
Dec 2, 2025, 11:45:50 AM (15 hours ago) Dec 2
to django-...@googlegroups.com
#36758: Template parser errors when using whitespace around pipe for certain
filters
-------------------------------------+-------------------------------------
Reporter: Stephen Skett | Owner: Ahmed
| Asar
Type: New feature | Status: closed
Component: Template system | Version: 4.2
Severity: Normal | Resolution: duplicate
Keywords: template, filter, | Triage Stage:
pipe, whitespace, divisibleby, | Unreviewed
center |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* resolution: => duplicate
* status: assigned => closed
* type: Uncategorized => New feature

Comment:

Duplicate of #29457
--
Ticket URL: <https://code.djangoproject.com/ticket/36758#comment:7>
Reply all
Reply to author
Forward
0 new messages