Opened 6 weeks ago

Last modified 3 weeks 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

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 (5)

comment:1 by Sarah Boyce, 6 weeks 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, 5 weeks ago

Has patch: set

comment:3 by Sarah Boyce, 4 weeks ago

Owner: set to Anders Hovmöller
Status: newassigned

comment:4 by Natalia Bidart, 4 weeks ago

Needs documentation: set
Patch needs improvement: set
Version: 5.0dev

comment:5 by Anders Hovmöller, 3 weeks ago

Needs documentation: unset
Note: See TracTickets for help on using tickets.
Back to Top