[Django] #35899: Allow newlines in {% %} tags

7 views
Skip to first unread message

Django

unread,
Nov 8, 2024, 3:53:09 AM11/8/24
to django-...@googlegroups.com
#35899: Allow newlines in {% %} tags
-------------------------------------+-------------------------------------
Reporter: Anders Hovmöller | Type: New
| feature
Status: new | Component: Template
| system
Version: 5.0 | Severity: Normal
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
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
--
Ticket URL: <https://code.djangoproject.com/ticket/35899>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Nov 8, 2024, 5:18:48 AM11/8/24
to django-...@googlegroups.com
#35899: Allow newlines in {% %} tags
----------------------------------+------------------------------------
Reporter: Anders Hovmöller | Owner: (none)
Type: New feature | Status: new
Component: Template system | Version: 5.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Changes (by Sarah Boyce):

* has_patch: 1 => 0
* stage: Unreviewed => Accepted

Comment:

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
--
Ticket URL: <https://code.djangoproject.com/ticket/35899#comment:1>

Django

unread,
Nov 13, 2024, 10:55:10 AM11/13/24
to django-...@googlegroups.com
#35899: Allow newlines in {% %} tags
----------------------------------+------------------------------------
Reporter: Anders Hovmöller | Owner: (none)
Type: New feature | Status: new
Component: Template system | Version: 5.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Changes (by Anders Hovmöller):

* has_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/35899#comment:2>

Django

unread,
Nov 19, 2024, 9:36:47 AM11/19/24
to django-...@googlegroups.com
#35899: Allow newlines in {% %} tags
-------------------------------------+-------------------------------------
Reporter: Anders Hovmöller | Owner: Anders
| Hovmöller
Type: New feature | Status: assigned
Component: Template system | Version: 5.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* owner: (none) => Anders Hovmöller
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/35899#comment:3>

Django

unread,
Nov 22, 2024, 7:44:53 AM11/22/24
to django-...@googlegroups.com
#35899: Allow newlines in {% %} tags
-------------------------------------+-------------------------------------
Reporter: Anders Hovmöller | Owner: Anders
| Hovmöller
Type: New feature | Status: assigned
Component: Template system | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):

* needs_better_patch: 0 => 1
* needs_docs: 0 => 1
* version: 5.0 => dev

--
Ticket URL: <https://code.djangoproject.com/ticket/35899#comment:4>

Django

unread,
Nov 28, 2024, 5:06:10 AM11/28/24
to django-...@googlegroups.com
#35899: Allow newlines in {% %} tags
-------------------------------------+-------------------------------------
Reporter: Anders Hovmöller | Owner: Anders
| Hovmöller
Type: New feature | Status: assigned
Component: Template system | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Anders Hovmöller):

* needs_docs: 1 => 0

--
Ticket URL: <https://code.djangoproject.com/ticket/35899#comment:5>
Reply all
Reply to author
Forward
0 new messages