3
0
Fork 0
mirror of https://github.com/nanoy42/coope synced 2024-12-26 08:53:47 +00:00
coope/django_tex/engine.py

12 lines
399 B
Python
Raw Normal View History

2019-01-06 14:57:02 +00:00
from django.template.backends.jinja2 import Jinja2
class TeXEngine(Jinja2):
app_dirname = 'templates'
def __init__(self, params):
default_environment = 'django_tex.environment.environment'
if 'environment' not in params['OPTIONS'] or not params['OPTIONS']['environment']:
params['OPTIONS']['environment'] = default_environment
super().__init__(params)