Multiple Template Engines > Updates - Funders - DEP - Campaign

Here's the story of the crowdfunding campaign, as published originally on Indiegogo.

Multiple Template Engines for Django

Provide first-class support for third-party template engines in Django and native Jinja2 integration

The project

The Django Template Language has a long history of receiving criticism for its design and its performance. During the last few years, the idea of replacing it with Jinja2 has come up regularly.

While the two languages have superficially similar syntax, they're quite different. Forcing a transition upon the entire Django ecosystem isn't realistic.

I'm proposing to solve this problem in Django 1.8 by:

This will provide a standardized way to use Jinja2 templates in Django projects and to ship Jinja2 templates with pluggable apps.

Furthermore this will pave the path to template-based form rendering.

I'm planning to split the project in three parts. Steps 1 and 3 are the core of the project. Step 2 isn't strictly required but it would allow for a more consistent implementation of step 3.

Each step should require about forty hours of work if everything goes well — which isn't the most likely outcome, but I'm prepared to take the time this project will require :-)

Step 1: write a Django Enhancement Proposal (DEP)

I'll start by researching the subject and designing the implementation. I've already performed preliminary analysis and sketched APIs in order to validate my ideas before starting this campaign. But I still have many decisions to make, details to check, and blanks to fill.

The output of this step will be a DEP that:

I will discuss and improve the DEP until consensus is reached.

Step 2: refactor Django templates as a library (stretch goal)

Unlike other Python template engines, Django templates are configured with global settings. That makes them hard to test or use as a library outside a Django project. This issue is discussed in ticket #17093 and in a mailing-list thread. Unfortunately, Christopher Medrela's patch wasn't merged and it doesn't apply any more.

My project is a good opportunity to complete this refactoring. It will bring Django templates up to par with other engines, make future maintenance easier, and is expected to provide a more robust base for implementing the DEP.

I will tackle this step if the campaign raises at least €6000.

Step 3: implement the DEP

You know the drill: code, tests, docs ;-)

That's nothing fancy but good software takes time, especially under strong backward-compatibility requirements.


Throughout the project, I will post weekly or fortnightly updates on the django-developers mailing-list and on the project's website. In each message, I will:

About me

I've been a Django core developer since 2011.

With more than 50 commits touching django.template or django.templatetags, I know Django's template engine very well.

I have contributed several large features to Django:

I haven't started working on a feature for Django 1.8 yet. If this campaign succeeds, it will be Jinja2!

Why Indiegogo?

An interesting question — after all I've been doing a lot of work for free during the last four years.

For each of the features listed above, I had a strong motivation. I worked on timezones to prove I could join the core team. I worked on Python 3 because I couldn't stand Python 2 any more. I worked on transactions and app-loading because my professional projects had hit Django's limitations in these areas.

Django templates are a different case. I'm happy with them for simple projects. They work quite well considering how they're designed and implemented. If I need something else, I know what my options are.

I'd like to improve Django in this area because I'm hearing demand from the community. However I'm not ready to dedicate so much of my free time without compensation for my family. Your gifts will allow me to give this project the attention it deserves and motivate me to produce the very best work I can manage.

If the campaign raises more than €8000 (which both the Migrations and PostgreSQL campaigns did) I will give back 20% of the proceeds above this limit to the Django Software Foundation and 5% to the Ada Initiative.

This campaign is my own. It isn't an official Django one. However, both the Django Software Foundation and the Django core team have given their approval.


Even the most carefully planned software project carries some risks. Unexpected edge cases can appear. Seemingly good design can be hard to implement cleanly.

However, considering my past experience with projects of similar size, I'm confident that I can resolve or sidestep such issues. Here are two examples:

There's also a small risk that the Django core team or technical board will object to my design or my implementation. However, I have already obtained positive feedback on the general design from several core developers and most members of the technical board. I have also committed more backwards-incompatible and more complicated changes to Django before.

How to help

If you like this project, even if you can't contribute directly, there are many ways you can help!

Thank you!