I'm building a Django app and chose to use Jinja2 for my templating engine. I noticed after I switched from Django's built in templating engine to Jinja2 the load keyword would not work, ex: {% load static %}. This is used to load static files like CSS. Is there a Jinja workaround for this in Django?
TemplateSyntaxError at /app/
Encountered unknown tag 'load'.
From settings.py:
TEMPLATES = [
{
'BACKEND': 'django.template.backends.jinja2.Jinja2',
'DIRS': [
os.path.join(BASE_DIR, 'app/templates/jinja2'),
],
'APP_DIRS': True,
'OPTIONS': {
'environment': 'my_project.jinja2.environment',
},
},
Django: 1.11
Jinja2: 2.9.6