On 10 févr. 2014, at 20:16, Carl Meyer <c...@oddbird.net> wrote: > I've proposed it before, and not in jest. Though perhaps not fully > seriously either, as full seriousness would mean supplying a patch.
I've heard an ex-BDFL accepting the idea. The other ex-BDFL was there and he didn't throw the first one through the window. Hence, the idea is accepted ;-) I would do it if I had the time. (As a full-time employee and father, my time isn't exchangeable for money.) The MVP would look like this: 1) Design a convention to tell DTL templates apart from Jinja2 templates. My favorite option is {# syntax: django #} or {# syntax: jinja2 #} in the first line of the file. Using a file extension would work too. For files that do not follow the convention, Django would default to DTL for two releases and then to Jinja2. Let the bikeshed begin ;-) 2) Convert all built-in templates Jinja2. Provide suitable replacements for template filters and tags we care about. This is a great opportunity to remove some historical cruft like the add filter. 3) Update various bits of template-related infrastructure appropriately. Given than jingo has less than 500 LoC excluding tests, and that Django's Template abstraction is very straightforward, I'm cautiously optimistic. This is a great opportunity to improve the pluggability of the template engine. If we do a good job, it will be possible to turn the legacy DTL into a separate project. We may have to make it less stateful to get there, maybe building on Christopher Medrela's patches (#17093). I have only one significant concern. Jinja2 is still a one-man-project [1] and that man has taken a public stance on Python 3 that is at odds with Django's. It's often misinterpreted as "Python 3 sucks" after a cursory reading. That said, I'm pretty sure that Jinja2 is more robust that the DTL, even under Python 3. I'm only worried about the PR. Whether we like it or not, software needs PR. I don't want to have to answer ridiculous comments such as "Look, Django is migrating to a template language anchored in Python's past!" [1] https://github.com/mitsuhiko/jinja2/graphs/contributors -- Aymeric. -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/70B2B842-9977-4F60-B743-4662019DE56A%40polytechnique.org. For more options, visit https://groups.google.com/groups/opt_out.