Opened 3 hours ago
Last modified 87 minutes ago
#35899 new New feature
Allow newlines in {% %} tags
Reported by: | Anders Hovmöller | Owned by: | |
---|---|---|---|
Component: | Template system | Version: | 5.0 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
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
Change History (1)
comment:1 by , 87 minutes ago
Has patch: | unset |
---|---|
Triage Stage: | Unreviewed → Accepted |
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