def django_to_jinja(template_name, context, **kw):
 context_instance = kw.pop('context_instance')
 source = loader.render_to_string(template_name, context, context_instance)
 request = context_instance['request']
 return jingo.render(request, jingo.env.from_string(source))

def django_to_jinja ( template_name , context , ** kw ) : context_instance = kw . pop ( 'context_instance' ) source = loader . render_to_string ( template_name , context , context_instance ) request = context_instance [ 'request' ] return jingo . render ( request , jingo . env . from_string ( source ) )
we monkeypatch django admins render_to_response to work in our jinja environment .