3
0
Fork 0
mirror of https://github.com/nanoy42/coope synced 2024-11-04 17:06:27 +00:00
coope/django_tex/environment.py

17 lines
389 B
Python
Raw Normal View History

2019-01-06 14:57:02 +00:00
from jinja2 import Environment
from django.template.defaultfilters import register
from django_tex.filters import FILTERS as tex_specific_filters
# Django's built-in filters ...
filters = register.filters
# ... updated with tex specific filters
filters.update(tex_specific_filters)
def environment(**options):
env = Environment(**options)
env.filters = filters
return env