I am attempting use a module called django-admin-tools
. It requires me to place 'admin_tools.template_loaders.Loader'
at the top of my templates. I have AppDirs: True
which means that I can't use the 'loaders'
option in the options section of templates. Where can I put 'admin_tools.template_loaders.Loader'
when AppDirs
is set to True
?
According this doc, when APP_DIRS
is True, that means django just use django.template.loaders.app_directories.Loader
.
So I think you don't have to set APP_DIRS
True. Just append that loader in loaders
with admin_tools.template_loaders.Loader
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': False,
'OPTIONS': {
...,
'loaders': [
'django.template.loaders.app_directories.Loader',
'admin_tools.template_loaders.Loader',
...
],
},
},
]