Using Jinja from string with django 1.8 – undocumented

Django documents how to specify a template engine via

django.template.engines

But not what custom template engines are named.

You can specify a "NAME" parameter to your template configuration to reference it from django.template.engines.

template = engines['jinja'].from_string(template_code)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s