/
README.txt
30 lines (22 loc) · 1.1 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Jinja2 template loader for Django 1.2 and above. Supports Jinja2 extensions,
and filters written for classic Django templates.
After installing, add jinja2loader.Loader to your project's settings file, e.g:
>>> TEMPLATE_LOADERS = (
... 'jinja2loader.Loader',
... 'django.template.loaders.filesystem.Loader',
... 'django.template.loaders.app_directories.Loader',
... )
You'll probably want to keep the regular Django loaders in there, to not break
apps that have their own templates - such as Django admin.
Settings:
JINJA2_TEMPLATE_DIRS:
A tuple of Jinja2 template directories. Defaults to TEMPLATE_DIRS.
JINJA2_EXTENSIONS:
A tuple of Jinja2 extensions to load - e.g ('jinja2.ext.i18n',)
JINJA2_GLOBALS:
A dictionary of global variables, passed to every template.
JINJA2_DJANGO_FILTER_LIBRARIES:
A tuple of Django filter libraries to be registered, given in the
same format as Django's {% load %} tag - e.g ('humanize',)
JINJA2_USE_DEFAULT_DJANGOFILTERS:
If True (default), loads Django's built-in filters.