Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Jinja2 template renderer for Django

Project Description

Cofingo is a combination of Coffin ( and Jingo ( It allows the usage of Jinja2 templates while keeping the tags and filters from Django (e.g. the URL tag)

Like Jingo the way to add custom filters, tags (extensions), and tests is by creating a file in your app.

Getting started

The easiest way to install Cofingo is by using pip:

pip install django-cofingo

The development version can be found at:


Add django_cofingo.Loader to your settings:


Templates are then rendered by Jinja2 whichever method is used (It works for class based views, TemplateResponse etc).

If you want to prevent that the templates of a specific app are rendered with Jinja2 then you can excluded them in your settings file:

COFINGO_EXCLUDED_APPS = ['admin', 'debug_toolbar']

(Note that these two apps are added by default)

Creating custom filters and extensions

Create a helpers module in your django app and add the following:

from django_cofingo.library import Library

library = Library()

If you want to add a filter add the following:

def my_custom_filter(value):
    return value + '-filtered'

Adding an extension can be done as follow:

from django_cofingo.library import Library
from django_assets.env import get_env
from webassets.ext.jinja2 import AssetsExtension

library = Library()
library.attr('assets_environment', get_env())

You can also add other modules with a library to Cofingo by specifying them in your file:


Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Hash SHA256 Hash Help Version File Type Upload Date
(17.2 kB) Copy SHA256 Hash SHA256
Source Jun 26, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting