Skip to content

Instantly share code, notes, and snippets.

View artscoop's full-sized avatar

Steve Kossouho artscoop

  • Dawan
  • Toulouse, France
  • 16:26 (UTC +02:00)
View GitHub Profile
@artscoop
artscoop / mako.py
Last active April 15, 2016 13:31
Mako template backend for Django 1.8+ (python 3)
# coding: utf-8
import tempfile
from os.path import join
from django.template import TemplateDoesNotExist, TemplateSyntaxError
from django.template.backends.base import BaseEngine
from django.template.backends.utils import csrf_input_lazy, csrf_token_lazy
from django.utils.functional import cached_property
from django.utils.module_loading import import_string
from mako import exceptions as mako_exceptions