Revisiting multiline template tags in Django Templates (again)

79 views
Skip to first unread message

Thibaud Colas

unread,
Sep 24, 2022, 3:37:52 AM9/24/22
to Django developers (Contributions to Django itself)
👋 Hi django-developers, I would like to revisit a very old feature request: ticket #8652 Multiline tags and tag escape tags, proposed DEP Multiline Template Tags, and maling list thread Revisiting multiline tags.

There have been a lot of cases made against and for multiline template tags across many threads. I’m raising this on the mailing list not necessarily to revisit those arguments but to ask:
  1. Is a DEP indeed the best way forward for this at this point in time? If so I will volunteer to author it (co-authors welcome!).
  2. The last DEP got blocked due to the lack of an implementation team and shepherd. If we made a new (proposed) DEP – is anyone here interested in helping in either positions?

Thibaud Colas

unread,
Sep 28, 2022, 6:24:30 AM9/28/22
to Django developers (Contributions to Django itself)
Just wanted to follow up that I got to discuss this in person with Carlton Gibson at the DjangoCon Europe sprints in Porto, who provisionally offered to act as a shepherd for this proposed DEP. This is on the condition that I find an implementation team as well.

Carlton Gibson

unread,
Sep 28, 2022, 6:42:11 AM9/28/22
to django-d...@googlegroups.com
Hey Thibaud. 

Thanks for following up! Yes — happy to sheppard. 

(My other comment was to make sure the Rationale was sufficiently clear/compelling, but I know you're on that 😉)
C.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/ddc74d02-63df-479a-968c-2ee44b696bd2n%40googlegroups.com.

Alex Morega

unread,
Sep 28, 2022, 8:40:28 AM9/28/22
to Django developers (Contributions to Django itself)
Hi Thibaud,

I don't have many contributions to Django, but FWIW, I'm happy to help with development.

Adam Johnson

unread,
Sep 28, 2022, 1:19:10 PM9/28/22
to django-d...@googlegroups.com
Big +1. IMO tags should work like HTML tags, which can be spread across multiple lines, as often done with multiple attributes. Also, Jinja does it.

If you're going to write a DEP, I'd say don't make it too long. The feature is clear enough.

The old PR is also short, as it affects only the lexer. It should rebase fairly well as the lexer won't have changed much. I would plan to test it with as many templates as possible, to ensure that the tokenization is the same before/after.

Happy to review... I'm planning on copying the lexer into django-upgrade so it can upgrade template files, so I would like to have some familiarity with it.

Reply all
Reply to author
Forward
0 new messages