#29457 closed Bug (wontfix)
Spaces between argument separator and argument in template filter generate error
Reported by: | oliver | Owned by: | oliver |
---|---|---|---|
Component: | Template system | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | yes |
Needs tests: | yes | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description (last modified by )
In the template filter system, spaces between augment separator and augments generate error.
For example, the following template code generates the following error.
{{ value | filter: "arg"}}
TemplateSyntaxError at / Could not parse the remainder: ': "arg"' from 'value | filter: "arg"'
It would be better to allow spaces between them.
Change History (7)
comment:1 by , 6 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 6 years ago
follow-up: 6 comment:3 by , 6 years ago
Needs documentation: | set |
---|---|
Needs tests: | set |
Resolution: | → wontfix |
Status: | assigned → closed |
Hi Oliver. Thanks for the input here.
I don't think we can just introduce a syntax change to the DTL without some discussion around that.
I'm not sure a consensus would form in favour of the change, but we need to check.
As such I'm going to close this as wontfix
.
If you want to push this forwards please post to the Django Developers mailing list explaining your proposed change and the reasons for it. (Please link here and to the PR on GitHub.)
If there's a consensus around the change then we can re-open this ticket and the PR.
If we were to make this change, it would need tests, and the new syntax would need to be documented too.
Thanks again.
comment:4 by , 6 years ago
Description: | modified (diff) |
---|
comment:5 by , 6 years ago
Description: | modified (diff) |
---|
comment:6 by , 6 years ago
Replying to Carlton Gibson:
Thanks for the review!
Are there any reasons that not allow spaces between separator and argument?
Hi Oliver. Thanks for the input here.
I don't think we can just introduce a syntax change to the DTL without some discussion around that.
I'm not sure a consensus would form in favour of the change, but we need to check.
As such I'm going to close this as
wontfix
.
If you want to push this forwards please post to the Django Developers mailing list explaining your proposed change and the reasons for it. (Please link here and to the PR on GitHub.)
If there's a consensus around the change then we can re-open this ticket and the PR.
If we were to make this change, it would need tests, and the new syntax would need to be documented too.
Thanks again.
comment:7 by , 6 years ago
I agree with the wontfix decision. The arguments are described on the django-developers thread.
https://github.com/django/django/pull/10009
I added "\s*" next to "(arg_sep)"