Jinja2 and Static Files on Django
I use Jinja2 as template engine with Django 1.8.
Here’s my settings.py snippet
TEMPLATES = [ { 'BACKEND': 'django.template.backends.jinja2.Jinja2', 'DIRS': [os.path.join(BASE_DIR, 'templates')], 'APP_DIRS': True, 'OPTIONS': {'environment': 'rdjango.jinja2.environment', }, }, { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] So I have to add directory templates inside the base directory (same level with manage.py), And also create file jinja2.py (inside project directory, same level with settings.