Changes between Initial Version and Version 1 of Ticket #36758
- Timestamp:
- Nov 28, 2025, 1:18:51 PM (62 minutes ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #36758
- Property Keywords center added
- Property Summary Template parser → Template parser errors when using whitespace around pipe for certain filters
-
Ticket #36758 – Description
initial v1 1 Based on discussion from previous support ticket #4746, I believe it should now be possible to add whitespace around the pipe-character when using a filter in a Django-template, if that is stylistically preferred. 1 Based on discussion from previous support ticket #4746, I believe it should now be possible to add whitespace around the pipe-character when using a filter in a Django-template, if that is stylistically preferred. However, I experience 'TemplateSyntaxError' when I use whitespace around the '|', specifically the built-in `divisibleby` and `center` filters - as in the following examples. 2 2 3 However, I experience 'TemplateSyntaxError' when I use whitespace around the '|', specifically the built-in `divisibleby` filter - as in the following example:3 With `divisibleby` in an `if`-tag (error: "Could not parse the remainder: '|' from '|'"): 4 4 {{{ 5 5 {% for obj in some_collection %} … … 10 10 }}} 11 11 12 I don't seem to encounter this error for any of the other built-in template-filters which I commonly use (e.g. `date`, `floatformat`, etc.), or with custom filters in my tag-libraries. Is this a bug with `divisibleby`, or am I missing something? 12 And, with `center` in a `with`-tag (error: "'with' expected at least one variable assignment"): 13 {{{ 14 {% with '' | center:loop_limit_val as loop_range %} 15 {% for _ in loop_range %} 16 {% comment %}Some HTML here...{% endcomment %} 17 {% endfor %} 18 {% endwith %} 19 }}} 20 21 I don't seem to encounter this error for most of the other built-in template-filters which I commonly use (e.g. `date`, `floatformat`, etc.), or with custom filters in my tag-libraries. Is this a bug with `divisibleby` / `center`, or am I missing something?