Opened 3 months ago
Last modified 3 months ago
#35899 assigned New feature
Allow newlines in {% %} tags
Reported by: | Anders Hovmöller | Owned by: | Anders Hovmöller |
---|---|---|---|
Component: | Template system | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Pull Requests: | 18805 | ||
Description ¶
That newlines inside {% %}
is not allowed makes some formatting of templates more ugly and bad for git blame. It also causes problems for beginners, as the error message when you do this is not great.
We should allow this, as opt in with an option for the template engine as a first step. Then progressively push people to this new world via defaulting createproject
to do this, deprecating the old, and then moving over fully.
Full discussion: https://forum.djangoproject.com/t/allow-newlines-inside-tags/36040
According to the ticket's flags, the next step(s) to move this issue forward are:
- To improve the patch as described in the pull request review comments or on this ticket, then uncheck "Patch needs improvement".
If creating a new pull request, include a link to the pull request in the ticket comment when making that update. The usual format is:
[https://github.com/django/django/pull/#### PR]
.
Change History (5)
comment:1 by , 3 months ago
Has patch: | unset |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 3 months ago
Has patch: | set |
---|
comment:3 by , 3 months ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:4 by , 3 months ago
Needs documentation: | set |
---|---|
Patch needs improvement: | set |
Version: | 5.0 → dev |
comment:5 by , 3 months ago
Needs documentation: | unset |
---|
Accepting as there appears to be a consensus for wanting this as a feature, marking has patch as no as I don't think there is an open PR for this yet
I haven't thought through the implementation plan in detail but that can still be discussed