Django template engine ripped from Django distribution.