Opened 7 days ago

Last modified 31 hours 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: yes 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 (2)

comment:1 by Sarah Boyce, 7 days ago

Has patch: unset
Triage Stage: UnreviewedAccepted

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

comment:2 by Anders Hovmöller, 31 hours ago

Has patch: set
Note: See TracTickets for help on using tickets.
Back to Top