Opened 13 days ago

Last modified 45 hours ago

#35899 assigned New feature

Allow newlines in {% %} tags

Reported by: Anders Hovmöller Owned by: Anders Hovmöller
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 (3)

comment:1 by Sarah Boyce, 13 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, 8 days ago

Has patch: set

comment:3 by Sarah Boyce, 45 hours ago

Owner: set to Anders Hovmöller
Status: newassigned
Note: See TracTickets for help on using tickets.
Back to Top